Jump to content

Missing references and .meta appears randomly when switching branches


Recommended Posts

During the past few days, we have been having too many situations where we experiment random bugs caused by missing references in Unity, It happens a lot with prefabs, the reason looks to be plastic randomly missing metadata whenever we pull from a different branch. Metadata randomly appears when switching branches/changeset. Is there any way to avoid these problems?



Link to comment
Share on other sites

Hi @braian123, thank you for reporting this issue. The Support team is still trying to nail down a consistent repro for why some prefabs lose their references while most don't. What we've discovered is that even when the Inspector values for a prefab are set to 0 or None, if you open the prefab in the Prefab Viewer than the references can be seen there. We think that the references are there but that the Scene View isn't updating to show the actual values.

Can you confirm that the prefabs missing references are the same ones whose .meta files are missing or changed? Were the prefabs recently edited before noticing that their references were missing? Can you also see the references if you inspect the prefab in the Prefab Viewer (by pressing Open in the Inspector window of the Prefab asset)?

Until we release a proper fix for this, one workaround that has worked for a lot of users is the following:

  1. On partner's computer, add empty Game Objects to the prefabs and save them.
  2. On my computer, make some changes to the prefabs that originally weren't syncing.
  3. Checkin my changes through the check in window
  4. On partner's computer, pull the changes and it will ask to resolve conflicts due to those empty game objects
  5. Resolve the conflicts by choosing the incoming changes
  6. From then on, any changes to those prefabs shouldn't be missing anymore.
Link to comment
Share on other sites

  • 2 months later...

We are having this problem too. It is a quite serious problem since we cannot be constantly checking that all our prefabs are not missing their references with each commit... This issue should be addressed, for what I'm seeing, it has been reported since 2021 and looks like there is not a solution for it...

Link to comment
Share on other sites

  • 3 weeks later...

I believe this problem was addressed in the latest version of the Version Control package (1.17.x at the time of writing). If this version is not available in Package Manager, you may need to update your version of Unity.

Hope this helps! 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...