bevy_bundletree

Crates.iobevy_bundletree
lib.rsbevy_bundletree
version
sourcesrc
created_at2024-05-18 22:34:17.560031
updated_at2024-11-30 22:58:41.459004
descriptionSpawn trees of bundles in the Bevy game engine.
homepagehttps://github.com/Katsutoshii/bevy_bundletree
repositoryhttps://github.com/Katsutoshii/bevy_bundletree
max_upload_size
id1244532
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Josiah Putman (Katsutoshii)

documentation

https://docs.rs/bevy_bundletree/latest/bevy_bundletree

README

bevy_bundletree

License Crates.io Docs

Spawn trees of bundles in Bevy to make UI Code more ergonomic.

Usage

Define an enum to represent all possible bundles in your tree and derive IntoBundleTree and BundleEnum.

use bevy::prelude::*;
use bevy_bundletree::*;

#[derive(IntoBundleTree, BundleEnum)]
enum UiNode {
    Node(NodeBundle),
    Text(TextBundle),
    Button(ButtonBundle),
}
fn setup(mut commands: Commands) {
    let tree: BundleTree<UiNode> = NodeBundle::default().with_children([
        TextBundle::default().into_tree(),
        ButtonBundle::default().into_tree()]);
    commands.spawn_tree(tree);
}

Bevy support table

bevy bevy_bundletree
0.15 0.3.0
0.14 0.2.1
0.13 0.1.1
Commit count: 11

cargo fmt