bevyengine / bevyengine/bevy

Dynamic queries with optional components

Open
#15,248 1 comment 0 reactions 0 assignees View on GitHub
A-ECS C-Feature D-Modest S-Ready-For-Implementation X-Uncontroversial
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## What problem does this solve or what need does it fill?

Dynamic queries with optional components. Dynamic queries should have feature parity with normal queries that support `Option` components.

## What solution would you like?

Add similar APIs as we have for `with` and `without`;

```rust
QueryBuilder::::new(world)
.option::();

QueryBuilder::::new(world)
.option_id(component_id);
```

## What alternative(s) have you considered?

N/A

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.