Skip to content

Commit 5a3528c

Browse files
update
Missed a few `GetInstanceID` uses and updating to use `GetEntityId`.
1 parent 81dafd9 commit 5a3528c

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

com.unity.netcode.gameobjects/Editor/NetworkManagerEditor.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,11 @@ private void DisplayNetworkManagerProperties()
285285
}
286286
}
287287
var networkPrefabs = m_NetworkManager.NetworkConfig.MigrateOldNetworkPrefabsToNetworkPrefabsList();
288+
#if UNITY_6000_2_OR_NEWER
289+
string path = Path.Combine(directory, $"NetworkPrefabs-{m_NetworkManager.GetEntityId()}.asset");
290+
#else
288291
string path = Path.Combine(directory, $"NetworkPrefabs-{m_NetworkManager.GetInstanceID()}.asset");
292+
#endif
289293
Debug.Log("Saving migrated Network Prefabs List to " + path);
290294
AssetDatabase.CreateAsset(networkPrefabs, path);
291295
EditorUtility.SetDirty(m_NetworkManager);
@@ -390,7 +394,8 @@ public override void OnInspectorGUI()
390394
#if !MULTIPLAYER_TOOLS
391395
DrawInstallMultiplayerToolsTip();
392396
#endif
393-
void SetExpanded(bool expanded) { networkManager.NetworkManagerExpanded = expanded; };
397+
void SetExpanded(bool expanded) { networkManager.NetworkManagerExpanded = expanded; }
398+
;
394399
DrawFoldOutGroup<NetworkManager>(networkManager.GetType(), DisplayNetworkManagerProperties, networkManager.NetworkManagerExpanded, SetExpanded);
395400
DisplayCallToActionButtons();
396401
base.OnInspectorGUI();

com.unity.netcode.gameobjects/Runtime/Components/RigidbodyContactEventManager.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,11 @@ public void RegisterHandler(IContactEventHandler contactEventHandler, bool regis
125125
{
126126
return;
127127
}
128+
#if UNITY_6000_2_OR_NEWER
129+
var instanceId = rigidbody.GetEntityId();
130+
#else
128131
var instanceId = rigidbody.GetInstanceID();
132+
#endif
129133
if (register)
130134
{
131135
if (!m_RigidbodyMapping.ContainsKey(instanceId))

0 commit comments

Comments
 (0)