2D Toolkit Forum

2D Toolkit => Support => Topic started by: DJVDJV on May 29, 2015, 07:43:10 am

Title: GetTile and GetTileInfoForTileId problem
Post by: DJVDJV on May 29, 2015, 07:43:10 am
Hello,

I have problem to get TileInfo from tiles with code:

int xToText = 10;
int yToTest = 5;

int tiledID = ownTileMap.GetTile(xToTest, yToTest, 0);
TileInfo info = ownTileMap.GetTileInfoForTileId(tiledID);

tiledID comes normal (Ranges 0-20 as I got 20 different tiles)

BUT

info.intval is always 0 (any xToText and yToText values)
and
info.stringval is always emty string. (any xToText and yToText values)

I would like to get "string name" (like "Wall7") for tile that I have set on editor (Get info.png)
What I do wrong?


Title: Re: GetTile and GetTileInfoForTileId problem
Post by: unikronsoftware on May 29, 2015, 11:06:43 pm
Have you set the actual values in the tilemap data tab? Those are the values that come through.