Layering Images in bevy_ui #4694
-
Hi sorry if this is the incorrect place for this but I am struggling with layering images but it appears that when overlaying images with code like this use bevy::prelude::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_startup_system(setup)
.run();
}
fn setup(mut commands: Commands) {
commands.spawn_bundle(UiCameraBundle::default());
commands.spawn()
.insert_bundle(ImageBundle {
color: Color::WHITE.into(),
..default()
})
.insert_bundle(ImageBundle {
color: Color::NONE.into(),
..default()
});
} The Issue occurs on 0.7 and git main |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Your second .insert_bundle() is overwriting the first call. You'll need to call commands.spawn() before each bundle to spawn 2 separate entities . |
Beta Was this translation helpful? Give feedback.
Your second .insert_bundle() is overwriting the first call. You'll need to call commands.spawn() before each bundle to spawn 2 separate entities .