We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8571cd1 commit b3bf6b3Copy full SHA for b3bf6b3
1 file changed
com.unity.netcode.gameobjects/Runtime/Configuration/NetworkPrefabs.cs
@@ -63,10 +63,7 @@ private void AddTriggeredByNetworkPrefabList(NetworkPrefab networkPrefab)
63
// This prefab is now in the PrefabList, so if we shutdown and initialize again, we'll pick it up from there.
64
m_Prefabs.Add(networkPrefab);
65
#if UNIFIED_NETCODE && UNIFIED_NGO_REGISTERS_PREFABS
66
- if (!PrefabTable.ContainsKey(networkPrefab.SourcePrefabGlobalObjectIdHash))
67
- {
68
- PrefabTable.Add(networkPrefab.SourcePrefabGlobalObjectIdHash, networkPrefab);
69
- }
+ PrefabTable.TryAdd(networkPrefab.SourcePrefabGlobalObjectIdHash, networkPrefab);
70
#endif
71
}
72
0 commit comments