pub trait DespawnRecursiveExt {
// Required methods
fn despawn_recursive(self);
fn despawn_descendants(&mut self) -> &mut Self;
fn try_despawn_recursive(self);
fn try_despawn_descendants(&mut self) -> &mut Self;
}
Expand description
Trait that holds functions for despawning recursively down the transform hierarchy
Required Methods§
Sourcefn despawn_recursive(self)
fn despawn_recursive(self)
Despawns the provided entity alongside all descendants.
Sourcefn despawn_descendants(&mut self) -> &mut Self
fn despawn_descendants(&mut self) -> &mut Self
Despawns all descendants of the given entity.
Sourcefn try_despawn_recursive(self)
fn try_despawn_recursive(self)
Similar to Self::despawn_recursive
but does not emit warnings
Sourcefn try_despawn_descendants(&mut self) -> &mut Self
fn try_despawn_descendants(&mut self) -> &mut Self
Similar to Self::despawn_descendants
but does not emit warnings
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl DespawnRecursiveExt for EntityCommands<'_>
impl DespawnRecursiveExt for EntityCommands<'_>
Source§fn despawn_recursive(self)
fn despawn_recursive(self)
Despawns the provided entity and its children. This will emit warnings for any entity that does not exist.
Source§fn try_despawn_recursive(self)
fn try_despawn_recursive(self)
Despawns the provided entity and its children. This will never emit warnings.
fn despawn_descendants(&mut self) -> &mut Self
fn try_despawn_descendants(&mut self) -> &mut Self
Source§impl<'w> DespawnRecursiveExt for EntityWorldMut<'w>
impl<'w> DespawnRecursiveExt for EntityWorldMut<'w>
Source§fn despawn_recursive(self)
fn despawn_recursive(self)
Despawns the provided entity and its children. This will emit warnings for any entity that does not exist.
Source§fn try_despawn_recursive(self)
fn try_despawn_recursive(self)
Despawns the provided entity and its children. This will not emit warnings.