-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behavior
Description
Bevy version
git 7699f8b6db0af6ca62fcd033e05df4f6c71ecb23 (current master at the time of this issue) - #987
Operating system & version
macOS 10.15.7
What you did
Spawn a sprite during game when none has been displayed at start
use bevy::prelude::*;
fn main() {
App::build()
.add_plugins(DefaultPlugins)
.add_startup_system(setup)
.add_system(display)
.run();
}
fn setup(commands: &mut Commands) {
commands.spawn(Camera2dBundle::default());
}
fn display(
commands: &mut Commands,
mut first: Local<bool>,
asset_server: Res<AssetServer>,
mut materials: ResMut<Assets<ColorMaterial>>,
) {
if !*first {
let texture_handle = asset_server.load("branding/icon.png");
info!(
"displaying sprite: {:?}",
commands
.spawn(SpriteBundle {
material: materials.add(texture_handle.into()),
..Default::default()
})
.current_entity()
);
*first = true;
}
}What you expected to happen
The sprite should have been displayed
What actually happened
The sprite wasn't displayed
Additional information
It was working with previous bevy commit
Metadata
Metadata
Assignees
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behavior