Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Tilemap API

Discussion in '2D Experimental Preview' started by CodeFighter, Jan 5, 2017.

  1. CodeFighter

    CodeFighter

    Joined:
    Dec 15, 2012
    Posts:
    63
    Hello,
    I really love this feature. Tilemap
    Does any API exist for it?

    To count tiles and get positions.
     
  2. CodeFighter

    CodeFighter

    Joined:
    Dec 15, 2012
    Posts:
    63
    Found the way how to obtain left and right tiles position.

    groundTilemap = GetComponent<TileMap>();
    leftLevelX=groundTilemap.localBounds.min.x;
    rightLevelX=groundTilemap.localBounds.max.x;
     
  3. Johaness_Reuben

    Johaness_Reuben

    Joined:
    Jan 27, 2016
    Posts:
    253
    CodeFighter likes this.