Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

How to get Transform data of a Tile Map.

Discussion in '2D Experimental Preview' started by shottyB, Aug 24, 2016.

  1. shottyB

    shottyB

    Joined:
    Aug 24, 2016
    Posts:
    2
    Is it possible to get transform data (position specifically) of a specific Tile Map?
    It looks like tileData.transform would be responsible for this, but I can't seem to figure it out. If anyone could post a quick example of how GetTileData and TileData are used in CS that would be great. Thanks!

    Edit: It occurs to me that I should probably explain what I'm trying to use it for:

    I've created a set of tiles on the tilemap designated as a spawn zone. I'm trying to get the bounds and location of this box so I can spawn enemies within a random range inside the bounding box of said tiles. Not sure if this is even possible.