bevy_hierarchy

Trait DespawnRecursiveExt

Source
pub trait DespawnRecursiveExt {
    // Required methods
    fn despawn_recursive(self);
    fn despawn_descendants(&mut self) -> &mut Self;
}
Expand description

Trait that holds functions for despawning recursively down the transform hierarchy

Required Methods§

Source

fn despawn_recursive(self)

Despawns the provided entity alongside all descendants.

Source

fn despawn_descendants(&mut self) -> &mut Self

Despawns all descendants of the given entity.

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<'_>

Source§

fn despawn_recursive(self)

Despawns the provided entity and its children. This will emit warnings for any entity that does not exist.

Source§

fn despawn_descendants(&mut self) -> &mut Self

Source§

impl<'w> DespawnRecursiveExt for EntityWorldMut<'w>

Source§

fn despawn_recursive(self)

Despawns the provided entity and its children. This will emit warnings for any entity that does not exist.

Source§

fn despawn_descendants(&mut self) -> &mut Self

Implementors§