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: alternate player spawning no players or networkclient player registration (#3122)
* fix
This resolves the issue where the player object was not being set properly if using alternate instantiate and spawn methods.
* test
Adjusted the ValidatePlayerObjects test to spawn players the 3 different ways and to validate the NetworkSpawnManager.PlayerObjects contains the newly spawned player on all instances and NetworkClient.PlayerObject is properly set on the owning client's NetworkManager.
* update
adding changelog entry
* update
adding the PR number to the 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
@@ -14,6 +14,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
14
14
15
15
### Fixed
16
16
17
+
- Fixed issue where spawning a player using `NetworkObject.InstantiateAndSpawn` or `NetworkSpawnManager.InstantiateAndSpawn` would not update the `NetworkSpawnManager.PlayerObjects` or assign the newly spawned player to the `NetworkClient.PlayerObject`. (#3122)
17
18
- Fixed issue where queued UnitTransport (NetworkTransport) message batches were being sent on the next frame. They are now sent at the end of the frame during `PostLateUpdate`. (#3113)
18
19
- Fixed issue where `NotOwnerRpcTarget` or `OwnerRpcTarget` were not using their replacements `NotAuthorityRpcTarget` and `AuthorityRpcTarget` which would invoke a warning. (#3111)
19
20
- Fixed issue where client is removed as an observer from spawned objects when their player instance is despawned. (#3110)
m_ErrorLogLevel2.Append($"[Client-{client.LocalClientId} Prefab Mismatch][Expected GlobalObjectIdHash: {expectedGlobalObjectIdHash} but was {remoteNetworkClient.PlayerObject.GlobalObjectIdHash}]");
m_ErrorLogLevel1.AppendLine($"[Client-{client.LocalClientId}] Local {nameof(NetworkSpawnManager.PlayerObjects)} does not contain {clientToValidate.LocalClient.PlayerObject.name}!");
m_ErrorLogLevel1.AppendLine($"[Client-{client.LocalClientId}] Local {nameof(NetworkSpawnManager.PlayerObjects)} does not contain {client.LocalClient.PlayerObject.name}!");
0 commit comments