When I first tested this, I expected hiding a parent entity to also hide its children. This would be a useful behavior: an example would be making a rudimentary state system by having each state be represented by a root entity, and hiding the root entity of inactive states so the entire states aren't visible.
Below is a minimal example of a child still being visible after the parent is hidden, using bevy 0.3.0.
use bevy::prelude::*;
fn main() {
App::build()
.add_plugins(DefaultPlugins)
.add_startup_system(setup.system())
.run();
}
fn setup(
mut commands: Commands,
mut materials: ResMut<Assets<ColorMaterial>>,
) {
commands
.spawn(Camera2dComponents::default())
.spawn(())
.with(Draw {
is_visible: false,
..Default::default()
})
.with_children(|parent| {
parent.spawn(SpriteComponents {
material: materials.add(Color::BLUE.into()),
sprite: Sprite::new(Vec2::new(50.0, 50.0)),
..Default::default()
});
});
}

When I first tested this, I expected hiding a parent entity to also hide its children. This would be a useful behavior: an example would be making a rudimentary state system by having each state be represented by a root entity, and hiding the root entity of inactive states so the entire states aren't visible.
Below is a minimal example of a child still being visible after the parent is hidden, using bevy 0.3.0.