bevy_bundletree

Crates.iobevy_bundletree
lib.rsbevy_bundletree
version0.5.0
created_at2024-05-18 22:34:17.560031+00
updated_at2025-04-26 20:58:56.506648+00
descriptionSpawn trees of bundles in the Bevy game engine.
homepagehttps://github.com/Katsutoshii/bevy_bundletree
repositoryhttps://github.com/Katsutoshii/bevy_bundletree
max_upload_size
id1244532
size649,706
Josiah Putman (Katsutoshii)

documentation

https://docs.rs/bevy_bundletree/latest/bevy_bundletree

README

bevy_bundletree

License Crates.io Docs

Spawn trees of bundles in Bevy to make UI Code more ergonomic.

The current version heavily based on https://github.com/Leafwing-Studios/i-cant-believe-its-not-bsn.

Usage

use bevy_ecs::prelude::*;
use bevy_bundletree::ChildBundle;

#[derive(Component)]
struct A;

#[derive(Component)]
struct B(u8);

fn spawn_hierarchy(mut commands: Commands) {
  commands.spawn(
   (A, // Parent
    ChildBundle( // This component is removed on spawn
      (A, B(3)) // Child
    )
  ));
}

Bevy support table

bevy bevy_bundletree
0.15 0.3.0
Commit count: 16

cargo fmt