Skip to content

fix: NetworkAnimator does not unsubscribe to OnClientConnectedCallback [MTT-4080] #2074

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

NoelStephensUnity
Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity commented Jul 22, 2022

This resolves the issue where a NetworkBehaviour component would not be able to determine if it was a client or server when its associated NetworkObject is despawned during the shutdown sequence.

MTT-4080
Fixes #2044

Changelog

  • Fixed issue where NetworkAnimator was not removing its subscription from OnClientConnectedCallback when despawned during the shutdown sequence. As well, IsServer and IsClient will still be valid properties to check when any NetworkObject is despawned during the shutdown sequence.

Testing and Documentation

  • Includes integration validation test.

NoelStephensUnity and others added 5 commits July 21, 2022 10:46
Adding the integration test that verifies NetworkAnimator properly removes its subscription to the NetworkManager.OnClientConnectedCallback when it is despawned.
fixing merge issue with changelog.
MTT-4080
This resolves the issue with NetworkAnimator not unsubscribing to OnClientConnectedCallback if the NetworkObject it belongs to is despawned during the shutdown sequence.
The test that validates this fix.
updating the PR number.
@NoelStephensUnity NoelStephensUnity marked this pull request as ready for review July 22, 2022 00:52
@NoelStephensUnity NoelStephensUnity requested a review from a team as a code owner July 22, 2022 00:52
Co-authored-by: Jesse Olmer <jesseo@unity3d.com>
removing the second spawn as that was legacy code from the original fix where it removed the check within NetworkAnimator for IsServer during cleanup.
@0xFA11 0xFA11 merged commit b91cf27 into develop Jul 22, 2022
@0xFA11 0xFA11 deleted the fix/mtt-4080-networkanimator-always-unsubscribe-onclientconnectedcallback branch July 22, 2022 15:12
jakobbbb pushed a commit to GooseGirlGames/com.unity.netcode.gameobjects that referenced this pull request Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants