Skip to content

fix: [NGOv2.x] Add OnPreShutdown to NetworkManager #3366

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
merged 5 commits into from
Mar 29, 2025

Conversation

jonathanhertz
Copy link
Contributor

Forwardport of #3358

This PR adds a NetworkManager.OnPreShutdown callback that happens before the internal shutdown is done. This is to allow accessing any state that is cleaned up by the NetworkManager during shutdown, such as accessing dynamically spawned NetworkObjects.

Changelog

  • Added: The event NetworkManager.OnPreShutdown has been added which is called before the NetworkManager cleans up and shuts down.

Testing and Documentation

  • A test has been added to ensure this is being called, and called before OnServerStopped.

@jonathanhertz jonathanhertz requested a review from a team as a code owner March 27, 2025 10:20
@NoelStephensUnity NoelStephensUnity enabled auto-merge (squash) March 29, 2025 00:30
Migrating to top of the added list
Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@NoelStephensUnity NoelStephensUnity enabled auto-merge (squash) March 29, 2025 00:32
@NoelStephensUnity NoelStephensUnity merged commit dfef393 into develop-2.0.0 Mar 29, 2025
27 checks passed
@NoelStephensUnity NoelStephensUnity deleted the fix/onpreshutdown-2-0-0 branch March 29, 2025 02:30
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.

3 participants