Skip to content

ickshonpe/bevy_despawn_tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Despawn an entire parent-child entity hierarchy from any entity at any depth in the hierarchy.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages