Skip to content

Commit 749a42b

Browse files
committed
Use more clear description
1 parent 24302cc commit 749a42b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

crates/bevy_ecs/src/schedule/condition.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,19 +146,19 @@ pub mod common_conditions {
146146
/// Generates a [`Condition`](super::Condition)-satisfying closure that returns `true`
147147
/// if there are any entities with the added given component type.
148148
///
149-
/// It's recommended to use this condition only if there is only a few entities
150-
/// with the component `T`. Otherwise this check could be expensive and hold
151-
/// up the executor preventing it from running any systems during the check.
149+
/// Run conditions are evaluated on the main thread, blocking any other systems from running.
150+
/// This run condition is relatively expensive, as it iterates over every entity with this component.
151+
/// As a result, you likely only want to use this run condition when the number of entitities with the component `T` is small.
152152
pub fn any_component_added<T: Component>() -> impl FnMut(Query<(), Added<T>>) -> bool {
153153
move |query: Query<(), Added<T>>| !query.is_empty()
154154
}
155155

156156
/// Generates a [`Condition`](super::Condition)-satisfying closure that returns `true`
157157
/// if there are any entities with the changed given component type.
158158
///
159-
/// It's recommended to use this condition only if there is only a few entities
160-
/// with the component `T`. Otherwise this check could be expensive and hold
161-
/// up the executor preventing it from running any systems during the check.
159+
/// Run conditions are evaluated on the main thread, blocking any other systems from running.
160+
/// This run condition is relatively expensive, as it iterates over every entity with this component.
161+
/// As a result, you likely only want to use this run condition when the number of entitities with the component `T` is small.
162162
pub fn any_component_changed<T: Component>() -> impl FnMut(Query<(), Changed<T>>) -> bool {
163163
move |query: Query<(), Changed<T>>| !query.is_empty()
164164
}

0 commit comments

Comments
 (0)