Function bevy::ecs::prelude::resource_changed
pub fn resource_changed<T>() -> impl FnMut(Res<'_, T>)where
T: Resource,
Expand description
Generates a Condition
-satisfying closure that returns true
if the resource of the given type has had its value changed since the condition
was last checked.
The value is considered changed when it is added. The first time this condition
is checked after the resource was added, it will return true
.
Change detection behaves like this everywhere in Bevy.
Panics
The condition will panic if the resource does not exist.