Skip to main content

hidden_entities

Function hidden_entities 

Source
pub fn hidden_entities(
    main: &mut World,
    parents: &HashMap<Entity, Entity>,
) -> HashSet<Entity>
Expand description

Returns the set of entities hidden by a [Visible(false)] or a display: none on themselves or any ancestor.

  • Used by extract fns to skip subtrees of <if mode="hide"> blocks and of display: none boxes without despawning.
  • First pass collects every hiding root; second pass walks each parents chain upward, memoising the answer per entity.
  • Matches crate::components::hidden_via_ancestors, the main-world walk the widget systems use.