Crate bevy_hierarchy

source ·
Expand description

bevy_hierarchy can be used to define hierarchies of entities.

Most commonly, these hierarchies are used for inheriting Transform values from the Parent to its Children.

Structs

Command that adds a child to an entity
An Iterator of Entitys over the ancestors of an Entity.
Struct for building children onto an entity
Contains references to the child entities of this entity.
An Iterator of Entitys over the descendants of an Entity.
Despawns the given entity’s children recursively
Despawns the given entity and all its children recursively
The base plugin for handling Parent and Children components
Command that inserts a child at a given index of a parent’s children, shifting following children back
Holds a reference to the parent entity of this entity. This component should only be present on entities that actually have a parent entity.
Command that pushes children to the end of the entity’s Children.
Command that removes children from an entity, and removes that child’s parent.
Command that removes the parent of an entity, and removes that entity from the parent’s Children.
Print a warning for each Entity with a T component whose parent doesn’t have a T component.
Struct for adding children to an entity directly through the World for use in exclusive systems

Enums

An Event that is fired whenever there is a change in the world’s hierarchy.

Traits

Trait defining how to build children
Trait that defines adding children to an entity directly through the World
Trait that holds functions for despawning recursively down the transform hierarchy
An extension trait for Query that adds hierarchy related methods.

Functions

System to print a warning for each Entity with a T component which parent hasn’t a T component.
Function for despawning an entity and all its children
Run criteria that only allows running when ReportHierarchyIssue<T> is enabled.