bevy_bundletree 0.5.0

Spawn trees of bundles in the Bevy game engine.
Documentation

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