bevy
bevy copied to clipboard
Make Query::new() pub
Changelog
- Added
Query::new()for low-level, unsafe uses of the ECS world.
Probably needs more expansive doc comments, but I'll leave that up to the ECS people who know what they're talking about :)
Should this be controversial? It makes a private API public. But it is already marked as unsafe, so is that enough?
For reference, here's what I'm trying to achieve: https://github.com/JMS55/bevy_dioxus/blob/main/src/hooks.rs#L104-L125
fn ui_root(cx: Scope) -> Element {
let names = use_query::<DebugName>(cx);
render!(
for name in names.query() {
"{name:?}"
}
)
}
Using SystemState worked, but has the unfortunate side effect of requiring things to be mut https://github.com/JMS55/bevy_dioxus/pull/19