Skip to content
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

fix: selecting everything selects session owner only #3305

Conversation

NoelStephensUnity
Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity commented Feb 18, 2025

This PR addresses:

  • An issue where selecting "Everything" would include the SessionOwner and end up with a value of -1 (i.e. the default value for "Everything" with an enum used as flags).
  • Root in-scene placed NetworkObject instances' not defaulting ownership permissions to Distributable unless it already has the SessionOwner flag set.
  • A yet-to-be-released issue in the develop-2.0.0 branch.

Changelog

  • Fixed: Issue where the NetworkObject.Ownership custom editor did not take the default "Everything" flag into consideration.
  • Changed: Root in-scene placed NetworkObject instances will now always have either the Distributable permission set unless the SessionOwer permission is set.

Testing and Documentation

  • No tests have been added.
  • Documentation changes or additions were necessary (PR-1423)

This fixes the issue with setting flags on NetworkObjects and the default Everything/All flag causing session owner to be grouped with the rest of the flags. Now all will initially select all flags but the session owner but if the all flag is selected again it toggles to just the SessionOwner flag.

This also assures that all root in-scene placed NetworkObjects have the Distributable or SessionOwner flag set (if neither then it defaults to Distributable).
Fixing some logic that would only skip over children if it was logging a message.
adding changelog entries.
adding API comments
Adding one for "None".
@NoelStephensUnity NoelStephensUnity marked this pull request as ready for review February 19, 2025 01:52
@NoelStephensUnity NoelStephensUnity requested a review from a team as a code owner February 19, 2025 01:52
Copy link
Collaborator

@EmandM EmandM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for untangling this!

@NoelStephensUnity NoelStephensUnity enabled auto-merge (squash) February 20, 2025 23:10
@NoelStephensUnity NoelStephensUnity merged commit 534f74e into develop-2.0.0 Feb 21, 2025
27 checks passed
@NoelStephensUnity NoelStephensUnity deleted the fix/selecting-everything-selects-session-owner-only branch February 21, 2025 01:05
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.

2 participants