-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Expose SystemMeta
's access field as part of public API
#16625
Conversation
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.
^_^
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.
Great docs, and I think we should expose this. That said, the mutable accessors need to be unsafe. If you lie about the access you can get UB by allowing aliased mutability at both the schedule and system levels.
Objective
Outside of the
bevy_ecs
crate it's hard to implementSystemParam
trait on params that require access to theWorld
, becauseinit_state
expects user to extend access inSystemMeta
and access-related fields ofSystemMeta
are private.Solution
Expose those fields as a functions