1
Support / Tilemap duplicating prefab
« on: April 30, 2015, 07:56:39 pm »
I have run into an issue where the tilemap is duplicating the prefabs associated with tiles.
If I destroy a tile/prefab by hitting it with a raycast, I have a switch/case area that then deletes the prefab associated with that tile and chooses the case based on the tiles ID. If the tile ID matches the door, turn off the door script and remove the meshcollider before deleting the prefab, then set the tile to the floor tile and build the tilemap.
Another case is for a generator where it just needs to delete the game object then set the tile to the floor tile then build the map.
Now when I delete a tile, regardless of whether a prefab is tied to it, there is a chance that all the prefabs in that chunk will be duplicated.
I saw this post seemed to have this issue http://2dtoolkit.com/forum/index.php/topic,4426.msg20784.html#msg20784
however you addressed it in emails.
Was anything figured out? Was it the way they were handling setTile and Build?
Some help would be great!
If I destroy a tile/prefab by hitting it with a raycast, I have a switch/case area that then deletes the prefab associated with that tile and chooses the case based on the tiles ID. If the tile ID matches the door, turn off the door script and remove the meshcollider before deleting the prefab, then set the tile to the floor tile and build the tilemap.
Another case is for a generator where it just needs to delete the game object then set the tile to the floor tile then build the map.
Now when I delete a tile, regardless of whether a prefab is tied to it, there is a chance that all the prefabs in that chunk will be duplicated.
I saw this post seemed to have this issue http://2dtoolkit.com/forum/index.php/topic,4426.msg20784.html#msg20784
however you addressed it in emails.
Was anything figured out? Was it the way they were handling setTile and Build?
Some help would be great!