Skip to content

Commit 110bc18

Browse files
chore: reference the Netcode for Entities assemblies by GUID
Three asmdefs named "Unity.NetCode" and "Unity.NetCode.Editor" as strings. Unity silently drops an asmdef reference it cannot resolve, so renaming either assembly would make every UNIFIED_NETCODE code path fail to compile with nothing pointing at the cause. A GUID reference resolves to whichever asmdef asset carries that GUID regardless of the name inside it, which is how NGO's own editor assembly rename stayed transparent to projects referencing it. The GUIDs are read from the installed package's .asmdef.meta files, not derived: Unity.NetCode 953adc2a6b8b4e3c8df5b728bcd546e9 Unity.NetCode.Editor eb8cf780bf058694ebf7ec5cf5b8cfa3 Unity.Entities is left by name. It is not the assembly at risk of a rename, and converting it would add surface that cannot be checked here for no benefit. Not verified locally: confirming a GUID reference resolves needs an editor with both packages installed. Worth an import in a project that has Netcode for Entities before this is relied on - if a GUID is wrong the reference drops silently, which is the failure this is meant to prevent.
1 parent dd472a6 commit 110bc18

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

com.unity.netcode.gameobjects/Editor/Unity.Netcode.Editor.asmdef

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"Unity.Networking.Transport",
99
"Unity.Services.Core",
1010
"Unity.Services.Authentication",
11-
"Unity.NetCode",
12-
"Unity.NetCode.Editor"
11+
"GUID:953adc2a6b8b4e3c8df5b728bcd546e9",
12+
"GUID:eb8cf780bf058694ebf7ec5cf5b8cfa3"
1313
],
1414
"includePlatforms": [
1515
"Editor"

com.unity.netcode.gameobjects/Runtime/Unity.Netcode.Runtime.asmdef

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"Unity.Collections",
1515
"Unity.Burst",
1616
"Unity.Mathematics",
17-
"Unity.NetCode",
17+
"GUID:953adc2a6b8b4e3c8df5b728bcd546e9",
1818
"Unity.Entities"
1919
],
2020
"includePlatforms": [],

com.unity.netcode.gameobjects/Tests/Runtime/Unity.Netcode.Runtime.Tests.asmdef

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"Unity.Mathematics",
1515
"UnityEngine.TestRunner",
1616
"UnityEditor.TestRunner",
17-
"Unity.NetCode",
17+
"GUID:953adc2a6b8b4e3c8df5b728bcd546e9",
1818
"Unity.Entities"
1919
],
2020
"includePlatforms": [],

0 commit comments

Comments
 (0)