NetworkPrefab has a duplicate GlobalObjectIdHash source entry value of XYZ
See original GitHub issueDescribe the bug: Every now and then, I get this issue when trying to enter play mode:
NetworkPrefab (Example1) has a duplicate GlobalObjectIdHash source entry value of: 951099334! Removing entry from list! NetworkPrefab (Example2) has a duplicate GlobalObjectIdHash source entry value of: 951099334! Removing entry from list! NetworkPrefab (Example3) has a duplicate GlobalObjectIdHash source entry value of: 951099334! Removing entry from list!
It seems to happen with some of the prefabs in my network prefabs list. To fix it, I just revalidate the NetworkObject
component (e.g., toggle one of the parameters on and off), and another GlobalObjectIdHash
is generated. I tried completely removing and re-adding the NetworkObject
components from each of the prefabs, however, it didn’t seem to work.
To reproduce: I unfortunately cannot seem to deterministically reproduce this error.
Screenshot:
Environment:
- OS: Windows 10
- Unity Version: 2020.3.12f1
- Netcode Version: 1.0.0-pre.3
- Unity Transport Version: 1.0.0.-pre.10
- Transport for Netcode Version: 1.0.0-pre.3
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:30 (13 by maintainers)
Top GitHub Comments
Ahh… yeah there have been several updates since v1.3.1 that might avoid some of the issues you are encountering. ParrelSync has been known to cause issues with prefabs and getting out of synchronization with the primary editor instance (editor that you are making changes to a prefab within).
I was diverted to a different issue yesterday so I haven’t had a chance to get back to this bug search… but will definitely post a link to the branch once I have pushed it to the repository. 👍
I’m following this issue with interest as the
951099334
issue is happening more frequently for us now. For now we’ve bypassed the issue by adding a button to call OnValidate on all our NetworkObjects.I’ve always seen this on our parrelsync clone, however just this morning every prefab in the main editor project was
951099334
for one of our team members.I’ve added some prints this morning to
GenerateGlobalObjectIdHash
to see what is going on, but there’s not much of a stack withOnValidate
unfortunately.Some interesting tidbits from prints so far:
OnValidate
seems to be called twice for each changed NetObj, most of the time, when doing a refresh on the parrelsync clone. The first time it gets the951099334
value, but then it gets called again with the proper value.OnValidate
call, but it was the correct value.I’ll let you know if/when I get the failure case.