Skip to main content

concinnity_core/components/
visibility_request.rs

1// src/components/visibility_request.rs
2
3use crate::components::EntityTarget;
4
5/// Runtime-only event requesting that an entity (and its descendants)
6/// be hidden or shown without despawning it. SpawnSystem drains these each
7/// step, toggling the subtree's Hidden tags and its draw slots' visibility.
8/// World authors never declare this type directly.
9#[derive(Debug, Clone, Copy)]
10pub struct VisibilityRequest {
11    /// The entity whose subtree is toggled.
12    pub target: EntityTarget,
13    /// `true` to show the subtree, `false` to hide it.
14    pub visible: bool,
15}