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
205 downloads per month
515KB
218 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.15 | 0.3.0 |
Dependencies
~11MB
~185K SLoC