From b096dd746ed8ac55b2f62faad9e387947c28d4a7 Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Thu, 5 Nov 2026 16:24:54 -0600 Subject: [PATCH 1/4] fix: UnifiedBootstrap no longer creates a duplicate LocalWorld on 7000.0.0a12+ From 7000.0.0a12 Entities creates the default world and all of its systems before it calls the custom bootstrap. UnifiedBootstrap still called CreateLocalWorld("LocalWorld") when no NetworkManager was initializing, so a second world ran every default system. Systems that hand state to NetworkManager (for example a system that registers itself with the transform state manager) could end up bound to the empty LocalWorld instead of the world that holds the scene's entities. Under UNITY_ENTITIES_WORLD_LIFETIME_CHANGES (the same version define N4E uses) the bootstrap now uses the existing default world. --- .../Runtime/Components/Helpers/UnifiedBootstrap.cs | 6 ++++++ .../Runtime/Unity.Netcode.Runtime.asmdef | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/com.unity.netcode.gameobjects/Runtime/Components/Helpers/UnifiedBootstrap.cs b/com.unity.netcode.gameobjects/Runtime/Components/Helpers/UnifiedBootstrap.cs index 4eed14fdff..b2b003f0db 100644 --- a/com.unity.netcode.gameobjects/Runtime/Components/Helpers/UnifiedBootstrap.cs +++ b/com.unity.netcode.gameobjects/Runtime/Components/Helpers/UnifiedBootstrap.cs @@ -112,7 +112,13 @@ public override bool Initialize(string defaultWorldName) } else { +#if UNITY_ENTITIES_WORLD_LIFETIME_CHANGES + // Entities creates the default world and all its systems before calling the bootstrap, so a local world + // here would run a second copy of every system against a world that holds none of the scene's entities. + LastCreatedWorld = World.DefaultGameObjectInjectionWorld; +#else LastCreatedWorld = CreateLocalWorld("LocalWorld"); +#endif } // Always wrap events that can invoke user script in a try-catch to assure any diff --git a/com.unity.netcode.gameobjects/Runtime/Unity.Netcode.Runtime.asmdef b/com.unity.netcode.gameobjects/Runtime/Unity.Netcode.Runtime.asmdef index e31ea05704..3d7acf0152 100644 --- a/com.unity.netcode.gameobjects/Runtime/Unity.Netcode.Runtime.asmdef +++ b/com.unity.netcode.gameobjects/Runtime/Unity.Netcode.Runtime.asmdef @@ -101,6 +101,11 @@ "expression": "0.1.0", "define": "UNITY_MULTIPLAYER_PLAYMODE" }, + { + "name": "Unity", + "expression": "7000.0.0a12", + "define": "UNITY_ENTITIES_WORLD_LIFETIME_CHANGES" + }, { "name": "Unity", "expression": "[6000.4.0b5,6000.5.0a1)", From 789e6dd2bde699791a7db9fc84f3174f9f264097 Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Thu, 5 Nov 2026 16:26:15 -0600 Subject: [PATCH 2/4] Update CHANGELOG --- com.unity.netcode.gameobjects/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/com.unity.netcode.gameobjects/CHANGELOG.md b/com.unity.netcode.gameobjects/CHANGELOG.md index 4a03809c92..de8ef1c4ee 100644 --- a/com.unity.netcode.gameobjects/CHANGELOG.md +++ b/com.unity.netcode.gameobjects/CHANGELOG.md @@ -18,6 +18,7 @@ Additional documentation and release notes are available at [Multiplayer Documen ### Fixed +- Issue where, on Unity 7000.0.0a12 and later, the unified bootstrap created a second world that ran a duplicate of every default system next to the default world. (#4243) - Ensured a useful and human readable error is logged when a NetworkVariable is trying to serialize a private or protected type. (#4239) - Issue where `NetworkAnimator` logged an error for a trigger-conditioned transition into an Exit node, and a client that joined during that transition, or during one into a sub-state machine, did not synchronize with it. Transitions that pass through Exit, Entry or sub-state machine nodes now resolve to the state they reach, and a late-joining client cross-fades from the matching originating state when several states transition into the same destination. (#4238) - Ensured all callbacks are wrapped with exception handling to avoid silent errors. (#4161) From 2b43608d04eb4909ae1bc94b82035ddb09b80ce6 Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Fri, 6 Nov 2026 12:47:59 -0600 Subject: [PATCH 3/4] update Bumping NGO version. Updating validation exceptions file with the bumped version. --- com.unity.netcode.gameobjects/ValidationExceptions.json | 4 ++-- com.unity.netcode.gameobjects/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/com.unity.netcode.gameobjects/ValidationExceptions.json b/com.unity.netcode.gameobjects/ValidationExceptions.json index 2ab78f628b..21067c4b40 100644 --- a/com.unity.netcode.gameobjects/ValidationExceptions.json +++ b/com.unity.netcode.gameobjects/ValidationExceptions.json @@ -3,12 +3,12 @@ { "ValidationTest": "NDA Keyword Validation", "ExceptionMessage": "#if UNITY_7000_0_OR_NEWER", - "PackageVersion": "3.2.1" + "PackageVersion": "3.2.2" }, { "ValidationTest": "NDA Keyword Validation", "ExceptionMessage": "File 'Editor/InScenePlacedProcessor.cs' contains deny-listed keyword pattern '(? Date: Fri, 6 Nov 2026 13:40:51 -0600 Subject: [PATCH 4/4] update Removing the NDA key words from the change log. --- com.unity.netcode.gameobjects/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.netcode.gameobjects/CHANGELOG.md b/com.unity.netcode.gameobjects/CHANGELOG.md index de8ef1c4ee..e56dd225e7 100644 --- a/com.unity.netcode.gameobjects/CHANGELOG.md +++ b/com.unity.netcode.gameobjects/CHANGELOG.md @@ -18,7 +18,7 @@ Additional documentation and release notes are available at [Multiplayer Documen ### Fixed -- Issue where, on Unity 7000.0.0a12 and later, the unified bootstrap created a second world that ran a duplicate of every default system next to the default world. (#4243) +- Issue where the unified bootstrap created a second world that ran a duplicate of every default system next to the default world. (#4243) - Ensured a useful and human readable error is logged when a NetworkVariable is trying to serialize a private or protected type. (#4239) - Issue where `NetworkAnimator` logged an error for a trigger-conditioned transition into an Exit node, and a client that joined during that transition, or during one into a sub-state machine, did not synchronize with it. Transitions that pass through Exit, Entry or sub-state machine nodes now resolve to the state they reach, and a late-joining client cross-fades from the matching originating state when several states transition into the same destination. (#4238) - Ensured all callbacks are wrapped with exception handling to avoid silent errors. (#4161)