NetworkObject GlobalObjectIdHash changes when in prefab isolation mode

I recently started using Netcode for Gameobjects, and noticed that I ended up with 2 prefabs that have the same hash.

After some investigation, I found that the hash gets corrupt if you use prefab isolation mode to edit the prefabs.

Specifically, GlobalObjecIdHash is just hashing the value of
var globalObjectIdString = UnityEditor.GlobalObjectId.GetGlobalObjectIdSlow(this).ToString();
But this method is returning the same value for any object in prefab isolation mode.
Specifically, it always returns GlobalObjectId_V1-0-00000000000000000000000000000000-0-0

I have two prefabs that somehow ended up serializing these values instead of their in-project-view values.

What can be done to avoid this? I am using NGO 1.5.1 and Unity 2023.1.3f1

Did you ever find an answer? I am finding it increasingly annoying

I’ve long since reported this on the Netcode for Gameobjects github repository and it has since been fixed. The editor will still display the wrong values but will serialize them correctly.

You can see the issue here: https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/issues/2653

Depending on which version of NGO you’re using, an update may resolve it (though potentially it may also bring new bugs)