Skip to content

fix: DestroyWithScene causes errors on non-authority side #3500

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 Jun 13, 2025

Description

This PR fixes the issue where enabling the NetworkObject.DestroyWithScene would cause errors on non-authority instances when loading a new scene (in single mode) or unloading the scene that the NetworkObject instance currently resides and using the distributed authority network topology.

Fix: #3144

MTTB-1384

Changelog

  • Fixed: Distributed authority related issue where enabling the NetworkObject.DestroyWithScene would cause errors when a destroying non-authority instances due to loading (single mode) or unloading scene events.

Testing and Documentation

  • Includes new integration test: NetworkObjectDestroyWithSceneTests.
  • No documentation changes or additions were necessary.

Backport

This is a v2.x distributed authority only issue.

@NoelStephensUnity NoelStephensUnity changed the base branch from release/2.4.2 to develop-2.0.0 June 17, 2025 19:12
Fixing the issue where destroy with scene could cause errors on non-authority instances.
removing using directive.
Refactoring my approach.
Adding change log entry.
Adjusting the NetworkObjectDestroyTests to be distributed authority compatible.
removing using directive.
Additional adjustments for this fix.
The integration test for this fix with some integration test adjustments.
@NoelStephensUnity NoelStephensUnity force-pushed the fix/destroy-with-scene-errorlog-distributed-authority branch from 6db25f0 to 224abb3 Compare June 17, 2025 19:15
moving changelog entry
@NoelStephensUnity NoelStephensUnity marked this pull request as ready for review June 17, 2025 19:21
@NoelStephensUnity NoelStephensUnity requested a review from a team as a code owner June 17, 2025 19:21
@NoelStephensUnity NoelStephensUnity enabled auto-merge (squash) June 17, 2025 19:37
Updating comment for spelling and readability.
Removing white space.
removing a
removing using directive.
@NoelStephensUnity NoelStephensUnity merged commit f966e07 into develop-2.0.0 Jun 17, 2025
35 checks passed
@NoelStephensUnity NoelStephensUnity deleted the fix/destroy-with-scene-errorlog-distributed-authority branch June 17, 2025 22:41
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