fix: spawn disabled in scene placed and network prefab registration#4093
Open
NoelStephensUnity wants to merge 23 commits into
Open
fix: spawn disabled in scene placed and network prefab registration#4093NoelStephensUnity wants to merge 23 commits into
NoelStephensUnity wants to merge 23 commits into
Conversation
Using the fixed version of NetworkPrefabHandlerSpawnAndSynchronizeTests. Fixing some issues with prefab and handler creation.
…and-network-prefab-registration
NoelStephensUnity
marked this pull request as ready for review
July 21, 2026 19:10
| CreateServerAndClients(NumberOfClients); | ||
| } | ||
|
|
||
| internal virtual bool ShouldCreatePlayerPrefab() |
Member
Author
There was a problem hiding this comment.
We might make this protected, but it seemed we needed a way to more easily control whether we should spawn the player prefab or not.
Codecov ReportAttention: Patch coverage is @@ Coverage Diff @@
## develop-2.0.0 #4093 +/- ##
=================================================
+ Coverage 66.40% 67.00% +0.59%
=================================================
Files 163 163
Lines 24999 25074 +75
=================================================
+ Hits 16601 16800 +199
+ Misses 8398 8274 -124
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 5 files with indirect coverage changes
|
EmandM
reviewed
Jul 23, 2026
…egistration' of https://github.com/Unity-Technologies/com.unity.netcode.gameobjects into fix/spawn-disabled-in-scene-placed-and-network-prefab-registration
…and-network-prefab-registration
NoelStephensUnity
enabled auto-merge (squash)
July 24, 2026 18:53
Clarified the categories of NetworkObjects and their requirements. Added details for dynamically instantiated and in-scene placed NetworkObjects.
EmandM
approved these changes
Jul 24, 2026
NoelStephensUnity
disabled auto-merge
July 24, 2026 22:36
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of this PR
This is a continuation of the fixes for the initial spawn sequence on the session owner/server side.
This PR includes:
NetworkObjectif it is initially disabled in the scene.NetworkObjects during runtime where theNetworkObject.GlobalObjectIdHashis zero.Jira ticket
NA
Changelog
NetworkObjectthat has a GlobalObjectIdHash of zero. These are not valid instances and will no longer be allowed to spawn.Documentation
Testing & QA (How your changes can be verified during release Playtest)
Functional Testing
Manual testing :
Manual testing doneAutomated tests:
Covered by existing automated testsCovered by new automated testsDoes 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.
Up-port
Up-port is required.
Backports
No back port is required.