fix: set the in scene placed field prior to serializing#4086
Open
NoelStephensUnity wants to merge 25 commits into
Open
fix: set the in scene placed field prior to serializing#4086NoelStephensUnity wants to merge 25 commits into
NoelStephensUnity wants to merge 25 commits into
Conversation
- Adjusted the `InScenePlaced` property to internally set or publicly get the serialized `m_InScenePlaced` field. - `NetworkObject` now implements `ISerializationCallbackReceiver` to assure `m_InScenePlaced` is always properly set for in-scene placed objects. - Removed legacy define for UNITY_2021_2_OR_NEWER since v2.x.x+ is only for Unity v6.
- `ISerializationCallbackReceiver` implementation as that does not accomplish what we need. - Setting InScenePlaced within OnValidate instead.
Fixing several issues with NetworkObjectSceneMigrationTests. Fixing several formatting issues.
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 fixes an edge case scenario where non-spawned NetworkObjects migrated into the DDOL during awake would not get spawned upon starting a session as a server, host, or session owner.
Jira ticket
Extension for #4073
Changelog
NetworkObjectnow implementsISerializationCallbackReceiverin order to assureNetworkObject.InScenePlacedis set and serialized for any in-editor in-scene placedNetworkObject.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 testsNetworkSceneManagerStartupTestsand associated assets to testproject.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
Does not require a backport.