- Home /
Prefab instance not keeping changes after saving scene and reloading
I have a prefab which has one script on it, using an editor Window script I assign a couple variables of this attached script. It works fine and all the values are assigned how I expect them to be, however if I then save the scene and reload, the prefab instance has lost all of it's data that wasn't saved in the original prefab. Now to make this stranger this problem is only occurring on instances of this prefab which I have as children of another prefab. So to clarify this issue does not occur on prefab instances which are NOT children of other prefabs. I hope this doesn't sound too confusing :/
Answer by _dns_ · Aug 16, 2014 at 03:01 PM
Hi, have you tried forcing the "dirty" flag on the parent object as well using http://docs.unity3d.com/ScriptReference/EditorUtility.SetDirty.html when you modify any child object ?