You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: InstantiateAndSpawn not honoring ownerClientId parameter in client-server (#2968)
* fix
NetworkSpawnManager.InstantiateAndSpawn should use ownerClientId when not in distributed authority mode.
* fix
NetworkObject.InstantiateAndSpawn should use ownerClientId when not in distributed authority mode.
* test and update
Updated NetworkObjectSpawning to validate against InstantiateAndSpawn.
Updated ChangeLog entry.
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
12
12
13
13
### Fixed
14
14
15
+
- Fixed issue where `NetworkSpawnManager.InstantiateAndSpawn` and `NetworkObject.InstantiateAndSpawn` were not honoring the ownerClientId parameter when using a client-server network topology. (#2968)
15
16
- Fixed issue where internal delta serialization could not have a byte serializer defined when serializing deltas for other types. Added `[GenerateSerializationForType(typeof(byte))]` to both the `NetworkVariable` and `AnticipatedNetworkVariable` classes to assure a byte serializer is defined.(#2962)
16
17
- Fixed issue when scene management was disabled and the session owner would still try to synchronize a late joining client. (#2962)
17
18
- Fixed issue when using a distributed authority network topology where it would allow a session owner to spawn a `NetworkObject` prior to being approved. Now, an error message is logged and the `NetworkObject` will not be spawned prior to the client being approved. (#2962)
Assert.IsTrue(s_GlobalNetworkObjects[m_ClientNetworkManagers[0].LocalClientId].ContainsKey(instanceNetworkObject.NetworkObjectId),$"Client-{m_ClientNetworkManagers[0].LocalClientId} failed to spawn {instanceNetworkObject.name}!");
190
+
}
191
+
else
192
+
{
193
+
Assert.IsTrue(s_GlobalNetworkObjects[m_ServerNetworkManager.LocalClientId].ContainsKey(instanceNetworkObject.NetworkObjectId),$"Client-{m_ServerNetworkManager.LocalClientId} failed to spawn {instanceNetworkObject.name}!");
0 commit comments