-
I know I can query an fn example_system(
pairs: Query<(Entity, &Parent), (With<...>, Without<...>)>,
) {
// Function body
} But what if I want to get the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It is common and performant to use queries to retrieve components for a single fn example_system(parent_query: Query<&Parent>) {
if let Ok(parent) = parent_query.get(entity) {
// ...
}
} If you haven't already, check out bevy-inspector-egui which is an extremely handy plugin that allows you to inspect your entities with a GUI. |
Beta Was this translation helpful? Give feedback.
It is common and performant to use queries to retrieve components for a single
Entity
withQuery::get
.If you haven't already, check out bevy-inspector-egui which is an extremely handy plugin that allows you to inspect your entities with a GUI.