From 749a42ba3e87bc3e0c6522eb479a755b5ae6afb3 Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Thu, 16 Feb 2023 19:00:22 +0200 Subject: [PATCH] Use more clear description --- crates/bevy_ecs/src/schedule/condition.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/bevy_ecs/src/schedule/condition.rs b/crates/bevy_ecs/src/schedule/condition.rs index 0764b44bc0992..8dcd0894b5db9 100644 --- a/crates/bevy_ecs/src/schedule/condition.rs +++ b/crates/bevy_ecs/src/schedule/condition.rs @@ -146,9 +146,9 @@ pub mod common_conditions { /// Generates a [`Condition`](super::Condition)-satisfying closure that returns `true` /// if there are any entities with the added given component type. /// - /// It's recommended to use this condition only if there is only a few entities - /// with the component `T`. Otherwise this check could be expensive and hold - /// up the executor preventing it from running any systems during the check. + /// Run conditions are evaluated on the main thread, blocking any other systems from running. + /// This run condition is relatively expensive, as it iterates over every entity with this component. + /// As a result, you likely only want to use this run condition when the number of entitities with the component `T` is small. pub fn any_component_added() -> impl FnMut(Query<(), Added>) -> bool { move |query: Query<(), Added>| !query.is_empty() } @@ -156,9 +156,9 @@ pub mod common_conditions { /// Generates a [`Condition`](super::Condition)-satisfying closure that returns `true` /// if there are any entities with the changed given component type. /// - /// It's recommended to use this condition only if there is only a few entities - /// with the component `T`. Otherwise this check could be expensive and hold - /// up the executor preventing it from running any systems during the check. + /// Run conditions are evaluated on the main thread, blocking any other systems from running. + /// This run condition is relatively expensive, as it iterates over every entity with this component. + /// As a result, you likely only want to use this run condition when the number of entitities with the component `T` is small. pub fn any_component_changed() -> impl FnMut(Query<(), Changed>) -> bool { move |query: Query<(), Changed>| !query.is_empty() }