Add a lax version of `RelationshipTarget` as a super trait.
Open
A-ECS
C-Feature
D-Straightforward
S-Needs-Design
X-Contentious
- 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?
An abstraction of "references multiple other entities" is very commonly needed, having it in bevy is nice. `RelationshipTarget` is overly specific and does not fit every use case.
## What solution would you like?
Add a super trait to `RelationshipTarget` called `EntityReferences`.
```rust
pub trait EntityReferences {
fn get_entities(&self) -> impl IntoIterator;
}
```
This works with most use cases from `Vec` to `Option`.
Contributor guide
Assessment
This issue has not been assessed yet.