FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: soft synchronization errors if loading a new scene and setting it as active by NoelStephensUnity · Pull Request #4065 · Unity-Technologies/com.unity.netcode.gameobjects · GitHub

fix: soft synchronization errors if loading a new scene and setting it as active - #4065

Merged
NoelStephensUnity merged 8 commits into
develop-2.0.0from
fix/4049/softsynch-and-improperly-marking-insceneplaced
Jul 11, 2026
Merged

fix: soft synchronization errors if loading a new scene and setting it as active#4065
NoelStephensUnity merged 8 commits into
develop-2.0.0from
fix/4049/softsynch-and-improperly-marking-insceneplaced

Conversation

NoelStephensUnity commented Jul 1, 2026
edited
Loading

Copy link
Copy Markdown
Member

Purpose of this PR

If, upon starting a host or server using the default client synchronization mode of LoadSceneMode.Single, a new scene is loaded additively, preserving the original scene already loaded, and then sets the newly loaded scene as the active scene, any client attempting to connect will get a soft synchronization error due to the serialization order of the scenes.

Jira ticket

MTT-15431

Changelog

  • Fixed: Issue where the active scene was not being serialized as the 1st scene which could result in various errors including a soft synchronization error if, on the client-side, other synchronized scenes had already been loaded prior to the active scene, which is always loaded as LoadSceneMode.SingleMode when client synchronization is set to LoadSceneMode.SingleMode, resulting in the previously loaded scene(s) to be unloaded.

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
    • The jira ticket contains a link to the project used to replicate and validate this issue.

Automated tests:

  • Covered by existing automated tests
  • Not covered by new or existing automated tests
    • This requires clients to be able to load scenes in LoadSceneMode.Single which cannot be done when running integration tests and sharing the same scene hierarchy (thus the manual test).

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 added the regression The issue is a regression (something that was working in previous version) label Jul 1, 2026
finishing an incomplete comment

Copy link
Copy Markdown
Member

I guess this will also address issue commented in https://discussions.unity.com/t/netcode-for-gameobjects-v2-13-0-is-now-publicly-available/1723847/5 right?

NoelStephensUnity removed the regression The issue is a regression (something that was working in previous version) label Jul 10, 2026
NoelStephensUnity changed the title fix: soft synchronization errors and improperly marking in-scene placed on spawned objects fix: soft synchronization errors if loading a new scene and setting it as active Jul 10, 2026
Removing the changes as this will be fixed in a separate PR.
Change log entry.
NoelStephensUnity marked this pull request as ready for review July 10, 2026 20:28
NoelStephensUnity requested a review from a team as a code owner July 10, 2026 20:28
NoelStephensUnity enabled auto-merge (squash) July 10, 2026 20:28
Removing trailing spaces....
NoelStephensUnity merged commit 3e579ed into develop-2.0.0 Jul 11, 2026
23 checks passed
NoelStephensUnity deleted the fix/4049/softsynch-and-improperly-marking-insceneplaced branch July 11, 2026 17:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL