2D Toolkit Forum
2D Toolkit => Support => Topic started by: howlomogo on September 27, 2013, 05:53:50 am
-
Hi There,
I have a problem where my Tilemap Prefab values keep resetting to the values of the default prefab. They seem to stay for a while after changing them but will randomly reset to default.
For example I have a Turret Prefab which has public variables of speed, distance etc. In my default prefab they are 0,0 but these are changed for every instance on tilemap, So in the Tilemap renderer where the prefabs are I set the values to the appropriate values such as 7,8. They work fine but after a while they reset back to 0,0 without having changed anything on the original prefab.
I have used the Tilemap data to select a prefab on a certain tile(I haven't added anything to String, Int, Float and Enable prefab offset is unchecked). Then I just paint them in and changed their public variables via the Tilemap renderer data to change the values.
I am quite new to using unity so I'm not sure if I'm missing something or if the Tilemap prefabs can't have different values.
Any help would be appreciated.
Thanks.
-
Seems the tile prefab is reset to defaults if I make any changes to the SpriteCollection they are in.
Is this normal or have I set something up wrong? :o
-
What version of 2d Toolkit are you using? Prefabs should retain their values, so if you're on the latest, this may well be a bug.
-
I'm using 2.2 final.
-
I'll investigate, your report does narrow it down quite a bit.
-
Awesome Thanks. I'll leave my SpriteCollections alone for the time being ;D
-
Came here to report the same issue. Using 2.2 final as well.
If you add or remove an item from the collection being used in the tilemap, then all of the instanced values are wiped. You can add or remove items from the collection as long as the tilemap is in edit mode.
-
Please take a look at the fix posted here and try it out on your data if possible.
http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,2761.0.html