Hi,
I updated unity to 2021.3.9 and tried to build IL2PCC win, but I got this error:
Trying to update the managed reference registry with invalid propertyPath(likely caused by a missing reference instance)‘managedReferences[2591244572266856457].cmp’, with value ‘’
The only workaround I found is to use a text editor to find the reference and delete it. In general, it also means that a reference has been lost so you may have to set the reference/value on this property again.
I am not really sure of what it is the cause but I think this something like that:
Say we have a prefab and an instance of it in the scene.
In your prefab, you have a property that use [SerializeReference]. You setup an instance that have a property ‘cmp’ and set a value.
Internally, it will create something like in your prefab asset (look at the reference id):
Now, you make some changes in the prefab and decide to get ride of the instance of your interface property. This change now replace 2591244572266856457 by, saying, 5166781093476565058.
Your prefab is now okay but when you go back to your scene, the file still contains a “prefab override” whose the property path still reference the old id (2591244572266856457).
Then, it will display you that: Trying to update the managed reference registry with invalid propertyPath(likely caused by a missing reference instance)'managedReferences[2591244572266856457].cmp', with value '{whatever}'
It is just a hypothesis but perhaps it can help. Despite [SerializeReference] being really really really useful (it is so much powerful), I think I will stop using it while this bug is not fixed (I think it will need a big rework of how things work if my hypothesis is valid) since it corrupts your prefabs/scenes, introducing value/reference losses and prevent buildings.
Would be great to get some idea of where this is happening. The error message just gives the property name and doesn’t say what prefab or even what script.
Trying to update the managed reference registry with invalid propertyPath(likely caused by a missing reference instance)‘managedReferences[3449465115153006597].EventOriginTransform’, with value ‘’
Edit - luckily the corruption occurred in a script-generated scene, so I could overwrite it.
We keep running into this error also. Very annoying - especially that the fix is dependent on a text-editor, and cannot be handled via the Unity Editor itself.
Also having this issue in Unity 2022.3.12f1, this is very frustrating, can someone from Unity PLEASE address this and how we can avoid it happening while you guys make a fix?
I found to get rid of this message, is to click the x Unused overrides “button” shown when inspecting the object overrides.
The error comes from the fact that when removing or changing scripts and/or script fields the previously serialized data in the scene remains (by design). For regular serialized fields [Serializefield] this is no problem (apart from the fact that it bloats the scene at some point). But it seems that for fields serialized with [SerializeReference] the path is checked for validity, which obviously is no longer valid due to removal or changes in the prefab.
Another great option which worked for me I found on GitHub by Marc-Antoine Girard
Origin:
This is indeed an error from Unity, which can appear when a prefab contains a SerializedReference variable (which ItemViews do) and overrides the value of something that doesn’t require an override. It’s pretty hard to reproduce since Unity usually tracks these things, but AFAIK, it should mostly happen when dealing with branches and Version Control.
How to Fix:
Copy the GUID in the managedReferences[GUID here] error. Then, open your scene (the one that triggers the error) in a Text Editor.
CTRL+F (find) it in the file. Once you find it, it should look like this:
This is a Prefab override block. Select everything from -target to objectReference (basically the whole block) and delete that. Repeat the search and delete until there’s no more block like that with that GUID.
Open Unity and Reload your scene. It should be fix now