-
Notifications
You must be signed in to change notification settings - Fork 437
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
feat: Add a SessionOwner ObjectStatus and allow InScenePlaced network objects to be distributed #3175
Merged
NoelStephensUnity
merged 21 commits into
develop-2.0.0
from
feat/session_owner_only_network_object_distribution
Dec 13, 2024
Merged
feat: Add a SessionOwner ObjectStatus and allow InScenePlaced network objects to be distributed #3175
NoelStephensUnity
merged 21 commits into
develop-2.0.0
from
feat/session_owner_only_network_object_distribution
Dec 13, 2024
Conversation
This file contains 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
…ttps://github.com/Unity-Technologies/com.unity.netcode.gameobjects into feat/session_owner_only_network_object_distribution
This reverts commit 3c3b354.
…ttps://github.com/Unity-Technologies/com.unity.netcode.gameobjects into feat/session_owner_only_network_object_distribution
…ttps://github.com/Unity-Technologies/com.unity.netcode.gameobjects into feat/session_owner_only_network_object_distribution
DAHost should not distribute session owner permission NetworkObjects. When client is promoted to session owner, for now newly promoted client takes ownership of NetworkObjects that have the SessionOwner permission set. Only prevent non-session owners from taking ownership of a NetworkObject with the SessionOwner permission set.
…ttps://github.com/Unity-Technologies/com.unity.netcode.gameobjects into feat/session_owner_only_network_object_distribution
NoelStephensUnity
approved these changes
Dec 13, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
NoelStephensUnity
deleted the
feat/session_owner_only_network_object_distribution
branch
December 13, 2024 06:29
NoelStephensUnity
added a commit
that referenced
this pull request
Dec 13, 2024
* fix: clamp spawntimeout to recommended range (#3174) * update Clamping spawntimeout * update improving parenting failed message when either the child or parent NetworkObject is not spawnd. * update Update the local SceneEventData.SceneEventType on the authority side for SceneLoadComplete. * style removing whitespaces * feat: Add a SessionOwner ObjectStatus and allow InScenePlaced network objects to be distributed (#3175) * Initial pass on SessionOwner ownership flag * feat: Add SessionOwner OwnershipStatus flag * update removing additional session owner accessor. * Add OwnershipPermissions tests * fix client connect * Revert "fix client connect" This reverts commit 3c3b354. * update object distribution for in-scene placed NetworkObjects needs to use the InScenePlacedSourceGlobalObjectIdHash when building an object distribution list. * Add changelog * Remove unnecessary change * Remove Settings.json * Reword CHANGELOG * fix DAHost should not distribute session owner permission NetworkObjects. When client is promoted to session owner, for now newly promoted client takes ownership of NetworkObjects that have the SessionOwner permission set. Only prevent non-session owners from taking ownership of a NetworkObject with the SessionOwner permission set. * test fix Avoid the RemoveOwnership client-server only method. * style Visual studio code cleanup likes to sort by alpha... fixing for our standards. * update Adding check for session owner trying to change ownership to a non-session owner client. * test Adding an additional validation that a non-session owner cannot change ownership and that a session owner cannot change ownership to a non-session owner when the NetworkObject in question has the SessionOwner permissions set. --------- Co-authored-by: NoelStephensUnity <[email protected]> --------- Co-authored-by: Emma <[email protected]>
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.
During the development of NGO DA it was surfaced that there are some network objects that we don't want to distribute when a new client joins. The workaround at the time was to not distribute any in-scene placed network objects when a new client joins.
This PR fixes this issue via adding a
NetworkObject.OwnershipStatus.SessionOwner
to mark objects that should be distributable, but should only ever belong to the current session owner. It also now allows in-scene placed network objects to be distributed.The
NetworkObject.OwnershipStatus.SessionOwner
flag will override all otherOwnershipStatus
flags, and cannot be set in conjunction with any other flag.Changelog
NetworkObject.OwnershipStatus.SessionOwner
flag. This flag will override all otherOwnershipStatus
flags.Testing and Documentation