2D Toolkit Forum
2D Toolkit => Support => Topic started by: robutmike on December 11, 2013, 04:54:36 pm
-
Hello,
I am trying to instantiate a blank tilemap clone into the scene, then fill it with tiles of a specific type. When I tried this before, it worked, but the tilemap prefab was actually edited permanently instead of creating a clone. So each time I generated a map, the map contained the tiles from the old map, as well as the new (with new tiles overlapping old).
Can someone explain how to do this properly? Should I not be using a tilemap except for when drawing in the editor?
Thanks,
RM
Edit: I am a fool. I was not instantiating a new tilemap. Problem solved!
-
The tile map wasn't designed for runtime creation - it requires some data scripts which can't be created properly at runtime, but prefabs work perfectly fine. As you've found this works fine if you instantiate the prefab before using it.
You can make the tile map size as big as you like, the overhead is very miminal for an empty tile map.