2D Toolkit Forum
2D Toolkit => Support => Topic started by: trlanfeng on January 13, 2015, 04:24:46 pm
-
I'm finding the way to build my game , I see 2D TOOLKIT support tilemap . I have a question and I didn't found a answer in Script Reference , so I hope get some help in the forum .
For example ,
The tilemap I had finished the tilemap in the editor , as default , the position of 1,1 is an NPC named "A" , when game is running , the player get 1 coin , then the NPC change to B .
how to save the changed tilemap ? when the game open next time , at the position 1,1 still is B NPC ?
can 2DTOOLKIT save the changed tilemap to a file or a string , when next time open , load the changed tilemap ?
My English , not very well , I hope you can understand me :)
-
I think you need to call EditorUtility.SetDirty on the tilemap after modifying it.
-
Thanks for your answer . But if I need to start a new game , I can't find the default tilemap anymore ?
-
If you're changing it WHILE the game is running, you can't save that automatically, you'll need to save the tiles that you've changed somewhere.