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
275 downloads per month
515KB
211 lines
bevy_bundletree
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