Function ambient_api::prelude::ambient_element::use_query
source · pub fn use_query<Components>(
hooks: &mut Hooks<'_>,
components: Components
) -> Vec<(EntityId, <Components as ComponentsTuple>::Data)>
Available on crate feature
guest
only.Expand description
Query the ECS for entities with the given components each frame and return the results.
The components to query are anything that can be passed to query.
This can be used to track the state of entities in the ECS within an element.