Crates.io | bundle_bundle |
lib.rs | bundle_bundle |
version | 0.1.1 |
source | src |
created_at | 2022-11-25 16:06:15.716474 |
updated_at | 2022-11-30 12:39:03.917597 |
description | bundle bundles in a chain |
homepage | |
repository | https://github.com/ickshonpe/bundle_bundle |
max_upload_size | |
id | 722859 |
size | 87,473 |
Extension trait for Bundle with one method bundle
that provides an alternative to tuples for building anonymous bundles.
Supports Bevy 0.9
Add to your project with:
cargo add bundle_bundle
Now where you used a tuple struct:
commands.spawn((
Text2dBundle::from_section("message", text_style),
Background(Color::NAVY),
MessageMarkerComponent,
));
You can instead use:
use bundle_bundle::BundleBundleExt;
commands.spawn(
Text2dBundle::from_section("message", text_style)
.bundle(BackgroundColor(Color::NAVY))
.bundle(MessageMarkerComponent)
);
cargo run --example hello_world