5 unstable releases

0.4.0 Dec 16, 2024
0.3.0 Nov 30, 2024
0.1.2 Jul 15, 2024
0.1.1 May 18, 2024
0.1.0 May 18, 2024

#1048 in Game dev

Download history 5/week @ 2024-09-20 2/week @ 2024-09-27 1/week @ 2024-10-11 3/week @ 2024-11-01 1/week @ 2024-11-08 141/week @ 2024-11-29 28/week @ 2024-12-06 158/week @ 2024-12-13 14/week @ 2024-12-20

205 downloads per month

MIT/Apache

515KB
218 lines

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

Dependencies

~11MB
~185K SLoC