diff --git a/com.unity.netcode.gameobjects/CHANGELOG.md b/com.unity.netcode.gameobjects/CHANGELOG.md index 4a03809c92..e56dd225e7 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 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) 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)", 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 '(?