Skip to content

Conversation

@NoelStephensUnity
Copy link
Collaborator

This resolves the issue where using NetworkObject.InstantiateAndSpawn or NetworkSpawnManager.InstantiateAndSpawn would not properly populate the NetworkSpawnManager.PlayerObjects or the NetworkClient.PlayerObject.

Changelog

  • 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.

Testing and Documentation

  • Includes integration test updates to NetworkClientAndPlayerObjectTests.ValidatePlayerObjects.
  • No documentation changes or additions were necessary.

This resolves the issue where the player object was not being set properly if using alternate instantiate and spawn methods.
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.
adding changelog entry
adding the PR number to the changelog entry.
@NoelStephensUnity NoelStephensUnity marked this pull request as ready for review November 12, 2024 22:11
@NoelStephensUnity NoelStephensUnity requested a review from a team as a code owner November 12, 2024 22:11
@NoelStephensUnity NoelStephensUnity merged commit d218b29 into develop-2.0.0 Nov 12, 2024
24 checks passed
@NoelStephensUnity NoelStephensUnity deleted the fix/alternate-player-spawning-no-players-or-networkclient-player-registration branch November 12, 2024 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants