Hi *,
at moment I try to manipulate my TileMap at runtime, but i don't get it work.
If have a TileMap at 0,0 with a width of 24 and a height of 25. It contains one Layer.
When I try this in a GameObject script, nothing happens:
public tk2dTileMap tileMap;
void Start () {
Debug.Log ("Start called");
int x, y;
tileMap.GetTileAtPosition(new Vector3(2, 2, 0), out x, out y); // x = y = 1
tileMap.SetTile(x, y, 0, 1);
tileMap.SetTile(x, y-1, 0, -1);
tileMap.SetTile(2, 2, 0, 1);
tileMap.SetTile(3, 3, 12, -1);
}
I tried different layer ids from -1 to 12 and nothing works. I also trieed to get the IDs through tileMap.Layers, but I found nothing usefull. I also player with different x,y coordinates, sprite ids and differen layer options.
Any idea?
Thanks in advance
Eddi