-
-
Couldn't load subscription status.
- Fork 4.2k
Open
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleA new feature, making something new possible
Description
What problem does this solve or what need does it fill?
For something like a UI tree, it can be useful to pass around a &World to allow read only access to the world to populate the tree in multiple places. But currently you can't get a QueryState out of &World as it requires &mut World to initialize the components in the query.
What solution would you like?
Have a panicking query_read_only that can be used from &World.
A lot of the foundational work for this has been done in #9774 which adds a get_state to SystemParam, which allows building a QueryState from &World. So this should probably be built on top of that work.
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleA new feature, making something new possible