- Home /
Issue with saving prefab parameters in Unity 3.5
Hello!
I am experiencing a rather frustrating issue with the latest version of Unity that has completely halted all development.
Specifically there appear to be issues with saving the parameters of prefabs and scripts. I first noticed the issue when I imported a package containing a script and a prefab (which had the script attached)
Any modifications I made to the parameters of the script attached to the prefab were lost upon shutting down unity.
I tried this with other prefabs of my own making and had no luck
I tried finding similar occurrences of the issue but all I found was this unsolved thread: http://answers.unity3d.com/questions/214618/changes-to-prefab-parameters-not-being-saved.html
I have searched high and low for a solution but nothing works, I am at the end of my tether here. Anyone have any ideas or similar experiences? Is this a documented bug?
Thanks in advance!
Are these changes you're making by hand, or via some script such as a wizard or whatever? If the changes are script-driven, you might want to make sure that `EditorUtility.SetDirty()` is called on any changed assets.
Are you only having problems with this one package? If so, do you know which version of Unity was used to export it?
Past that, I'd say that anything you can do to narrow down the exact repro steps would help troubleshoot.
Answer by roamcel · Apr 03, 2012 at 07:03 AM
I'd suggest a perpendicular approach to the problem. Add a cube to the scene. Add a new script to the project, and put any public variable in it. Add the script to the cube, and change the variable. Create a prefab out of the cube, exit unity, and see if it updates correctly.
Remove the troublesome script from the original prefab. Put the new script in it, and do the same as with the cube. If it works, it's the original script's fault, otherwise there's something wrong with the prefab meta, which you might have to redo from scratch.