Skip to content

fix: soft synchronization errors and improperly marking in-scene placed on spawned objects#4065

Draft
NoelStephensUnity wants to merge 4 commits into
develop-2.0.0from
fix/4049/softsynch-and-improperly-marking-insceneplaced
Draft

fix: soft synchronization errors and improperly marking in-scene placed on spawned objects#4065
NoelStephensUnity wants to merge 4 commits into
develop-2.0.0from
fix/4049/softsynch-and-improperly-marking-insceneplaced

Conversation

@NoelStephensUnity

Copy link
Copy Markdown
Member

Purpose of this PR

This PR resolves three regression bugs:

  • The active scene was not being serialized as the 1st scene and could be loaded on the client-side after other scenes loaded from the received SceneEventData had been loaded resulting in those scenes being unloaded when client synchronization mode is set to LoadSceneMode.Single.
  • Recent improvements to how we handle marking NetworkObjects as in-scene placed introduced an editor only issue where it could end up setting already dynamically spawned instances as in-scene placed.
  • Specific edge case scenarios could result in no network prefab being found and upon logging a warning message during NetworkObject.Deserialization it could throw an exception when the searched for prefab's NetworkObject resulted in returning null.

Jira ticket

Jira pending...

Fix: #4049

Changelog

  • Fixed: WIP

Documentation

  • No documentation changes or additions were necessary.

Testing & QA (How your changes can be verified during release Playtest)

Functional Testing

Manual testing :

  • Manual testing done
    • A manual test was added to the internal NGO Examples repository on the main branch. (pending push)

Automated tests:

  • Covered by existing automated tests
  • Covered by new automated tests
    • WIP: Several tests need to be written to cover these edge cases.

Does the change require QA team to:

  • Review automated tests?
  • Execute manual tests?
  • Provide feedback about the PR?

If any boxes above are checked the QA team will be automatically added as a PR reviewer.

Backports

No back port is required.

If the NetworkObject was not found then use "null" as the name of the NetworkObject.
This fixes the issue where the active scene could end up not being the 1st scene loaded which upon loading the active scene and previously SceneEventData relative loaded scenes would get unloaded when loading the active scene since this will can end up being loaded in SingleMode.
This fix just ignores any spawned objects when setting any just loaded InScenePlaced objects while running in the editor.
@NoelStephensUnity NoelStephensUnity added the regression The issue is a regression (something that was working in previous version) label Jul 1, 2026
finishing an incomplete comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

regression The issue is a regression (something that was working in previous version)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[2.13.0] Default Player Prefab causes "In-Scene placed NetworkObject soft synchronization failure"

1 participant