#bevy #bevy-ui #bundle

bevy_bundletree

Spawn trees of bundles in the Bevy game engine

8 releases (4 breaking)

Uses new Rust 2024

0.6.1 Oct 6, 2025
0.6.0 Oct 6, 2025
0.5.0 Apr 26, 2025
0.4.0 Dec 16, 2024
0.1.1 May 18, 2024

#1667 in Game dev

Download history 6/week @ 2025-07-30 1/week @ 2025-08-20 213/week @ 2025-10-01 53/week @ 2025-10-08 5/week @ 2025-10-15 4/week @ 2025-10-22

275 downloads per month

MIT/Apache

515KB
211 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.17 0.6.0
0.16 0.5.0
0.15 0.3.0-0.4.0

Dependencies

~12MB
~218K SLoC