bevy_despawn_tree 0.1.0

Despawn an entire parent-child entity hierarchy from any entity at any depth in the hierarchy.
Documentation
  • Coverage
  • 16.67%
    1 out of 6 items documented0 out of 3 items with examples
  • Size
  • Source code size: 56.58 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.76 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • ickshonpe/bevy_despawn_tree
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ickshonpe

bevy_despawn_tree

crates.io MIT/Apache 2.0 crates.io

An extension method for Bevy's EntityCommands that despawns an entire parent-child entity hierarchy tree from an EntityCommands for any entity at any depth in the hierarchy.

Supports Bevy 0.8

Usage

Add the dependency to your project's Cargo.toml:

bevy_despawn_tree = "0.1.0"

Then to despawn the tree containing the entity leaf:

use bevy_despawn_tree::*;

commands.entity(leaf).despawn_tree();

Example

Spawns two marked trees, despawns one from a queried child without touching the other.

cargo run --example example