2D Toolkit Forum
2D Toolkit => Support => Topic started by: zeteginara on March 18, 2014, 02:24:32 pm
-
So, I've decided that it is probably a good idea to have 'one scene' for most or all of my 2D game, and constantly use the one tile map to draw stuff from levels stored in data format.
But, of course, I don't want to write XML (or whatever I use) to build my levels, I want to draw them in 2Dtoolkit then save/load them. Is there an easy, built in way of doing this? Or will I have to write it myself? If the latter, any pointers?
-
I would imagine it would be as easy as creating your tilemaps as normal in a scene, saving the generated tilemap prefabs under the Resources folder, and then programmatically loading them like any other game object (http://answers.unity3d.com/questions/12003/instantiate-a-prefab-through-code-in-c.html (http://answers.unity3d.com/questions/12003/instantiate-a-prefab-through-code-in-c.html))
-
Or just save them as different scenes, then use LoadLevelAdditive to load the level with your tile map in it.
-
Or just save them as different scenes, then use LoadLevelAdditive to load the level with your tile map in it.
Yep, this would work well too!