Function ambient_api::ecs::query

source ·
pub fn query<Components>(
    components: Components
) -> GeneralQueryBuilder<Components>
where Components: ComponentsTuple + Copy + Clone + 'static,
Expand description

Creates a new GeneralQueryBuilder that will find entities that have the specified components and can be built to create a GeneralQuery.

Building a query is somewhat expensive, but they are cheap to copy and evaluate, so it’s recommended that you build your queries once and reuse them elsewhere.