- Home /
Why are Prefabs now storing a list of modifications?
Since upgrading to Unity 5.1, I noticed that whenever I make a change to any properties on a prefab, at the end of the prefab file it appears to be keeping a list of all the modifications. I imagine this was added to make resolving source control conflicts easier, but is there a way to disable this to avoid prefabs getting too bloated?
Example (found at end of prefab):
...
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 0}
propertyPath: weaponName
value: Grenade
objectReference: {fileID: 0}
- target: {fileID: 0}
propertyPath: weaponId
value: 27
objectReference: {fileID: 0}
...
I additionally noticed that after restructuring a prefab and updating object references, this m_$$anonymous$$odification list displays those references as null. Is this something to be concerned about?
I additionally noticed that after restructuring a prefab and updating object references, this m_$$anonymous$$odification list displays those references as null. Is this something to be concerned about?
There is also a bug with them. If you dupe a prefab, and then change it, the original value is still in this m_$$anonymous$$odification section, so Unity thinks it is a dependancy; a pretty serious bug I$$anonymous$$O. Unity, please let us turn these off or fix this!
@tayl0r We ran into that same problem, as we are parsing prefabs ourselves to search for dependencies on particular effects that are pooled. We now have a tool to clear out this m_$$anonymous$$odification array to avoid this problem, and since I've posted this question in multiple places and never heard anything back.
@JonRoss88 hey jon, do you still have your tool clearing m_$$anonymous$$odifications fields? I would be really interested! It create a mess into AssetBundles dependencies.