Serialization Breaks

Hey guys anybody had the same experience?
We are switching branches and the serialization seems to
break on our prefabs.

In the YAML file of the prefab a value is saved with the correct value, after switching branches back and forth the value of the property is not displayed correctly anymore. When I drop the prefab into my scene or inspecting it in the project the value is set to the default value (e.g. float to 0 or gameObject references to “empty”) but the YAML holds the correct one.

3562774--287057--upload_2018-7-13_15-47-40.png

3562774--287058--upload_2018-7-13_15-47-54.png

Unity Veriosn: 2018.1.1f1

Perhaps someone renamed the field and forgot to use the UnityEngine.Serialization.FormerlySerializedAsAttribute?

Hey Peter, unfortunately that’s not the point as many references break. Float values, gameobject and tranform references.

Has the prefab property been overridden? Check the scene yaml.

@karl_jones no, even if i click revert or inspect the value within the project window the values aren’t displayed correctly. but are correct in the yaml of the prefab. The main problem is that once I click apply (cause i want to store new values or references) the false values get written in the yaml of the prefab

We just updated to 2018.2.0f2 and this seems to fix this issue. I have no idea what caused this problem and I do hope I never face this issue again cause it really stressed the hell out of me.

1 Like

I just upgraded a project from Unity 2019.4.22f1 to 2019.4.23f1 and I now have this problem. In one scene, all prefabs are showing their default values instead of the proper serialized values. The inspector shows no overrides. If I open the prefab, all serialized properties show their proper values.

The strange thing is that I upgraded another project containing the same scene and the issue doesn’t exist, so it appears to only happen to some projects and not others. I’ve not been able to determine why yet.