https://github.com/jakobhellermann/bevy_ecs_dynamic
Utilites for working with `bevy_ecs` when not all types are known at compile time
https://github.com/jakobhellermann/bevy_ecs_dynamic
Last synced: about 1 year ago
JSON representation
Utilites for working with `bevy_ecs` when not all types are known at compile time
- Host: GitHub
- URL: https://github.com/jakobhellermann/bevy_ecs_dynamic
- Owner: jakobhellermann
- License: apache-2.0
- Created: 2022-08-04T11:10:22.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-28T12:16:20.000Z (about 3 years ago)
- Last Synced: 2025-04-12T23:53:59.812Z (about 1 year ago)
- Language: Rust
- Size: 71.3 KB
- Stars: 19
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# bevy_ecs_dynamic
Utilities for working with `bevy_ecs` in situations where the types you're dealing with might not be known at compile time (e.g. scripting, modding).
# Example Usage
## Dynamic Query
```rust
let component_id_1 = world.init_component::();
let component_id_2 = world.init_component::();
world.spawn().insert(TestComponent1).insert(TestComponent2);
world.spawn().insert(TestComponent1);
let mut query = DynamicQuery::new(&world, vec![FetchKind::Ref(component_id_1)], vec![FilterKind::Without(component_id_2)]);
assert_eq!(query.iter(&world).count(), 1);
```
# Bevy support table
| bevy | bevy\_ecs\_dynamic |
| ---- | ------------------ |
| 0.8 | _unreleased_ |