Skip to content

fix: prevent exception when showing despawned or destroyed NetworkObject #3029

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

Merged

Conversation

NoelStephensUnity
Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity commented Aug 25, 2024

This resolves an issue where a NetworkObject component could be despawned or its GameObject destroyed in the same frame prior to attempting to show it.

MTTB-377
fix: #3023

Changelog

  • Fixed: Issue where the NetworkSpawnManager.HandleNetworkObjectShow could throw an exception if one of the NetworkObject components to show was destroyed during the same frame.

Testing and Documentation

  • Includes integration test NetworkVisibilityTests.HideShowAndDeleteTest.
  • No documentation changes or additions were necessary.

Adding protections against exceptions in the NetworkSpawnManager.HandleNetworkObjectShow method.
validate the fix
adding changelog entry.
adding PR number to changelog entry.
@NoelStephensUnity NoelStephensUnity marked this pull request as ready for review August 25, 2024 17:23
@NoelStephensUnity NoelStephensUnity requested a review from a team as a code owner August 25, 2024 17:23
@NoelStephensUnity
Copy link
Collaborator Author

Requires #3024 to be merged in order to pass the package check.

Removing whitespace
Adding 2022.3 define for find objects.
NoelStephensUnity added a commit that referenced this pull request Aug 25, 2024
up-port of #3029
NoelStephensUnity added a commit that referenced this pull request Aug 25, 2024
up-port test of #3029 while also taking into consideration the two network topologies.
@NoelStephensUnity NoelStephensUnity merged commit a597b9f into develop Aug 26, 2024
24 checks passed
@NoelStephensUnity NoelStephensUnity deleted the fix/prevent-exception-when-showing-despawned-object branch August 26, 2024 22:54
NoelStephensUnity added a commit that referenced this pull request Aug 26, 2024
… of #3029 (#3030)

* fix

up-port of #3029

* test

up-port test of #3029 while also taking into consideration the two network topologies.

* update

Adding changelog entry.
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.

NetworkShow() follow by Despawn livelocks the server
2 participants