Hello Guest

Author Topic: GetTile and GetTileInfoForTileId problem  (Read 3248 times)

DJVDJV

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 30
    • View Profile
GetTile and GetTileInfoForTileId problem
« 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?



unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: GetTile and GetTileInfoForTileId problem
« Reply #1 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.