-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Children are invisible unless parent has Visibility and ComputedInvisibility #5334
Copy link
Copy link
Closed
Labels
C-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorS-Needs-TriageThis issue needs to be labelledThis issue needs to be labelled
Description
Bevy version
main, also
c8aa047 (commit prior to #5310)
What you did
use bevy::prelude::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_startup_system(setup)
.run();
}
fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
commands.spawn_bundle(Camera2dBundle::default());
commands
.spawn_bundle(TransformBundle::default())
// .insert(ComputedVisibility::default())
// .insert(Visibility::default())
.with_children(|parent| {
parent.spawn_bundle(SpriteBundle {
texture: asset_server.load("branding/icon.png"),
..default()
});
});
}What went wrong
Prior to #5310, the above code worked as-is and displayed the bevy logo.
After #5310, the logo is not displayed unless the two commented-out lines are uncommented.
Additional information
If this is expected behavior, we should mention that in the migration guide and close this.
This may have implications for other bits of documentation / examples.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behaviorS-Needs-TriageThis issue needs to be labelledThis issue needs to be labelled