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

Struct for building children onto an entity

Contains references to the child entities of this 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.

Component that holds the Parent this entity had previously

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 and inserts it into the previous parent component

Struct for adding children to an entity directly through the World for use in exclusive systems

Enums

Label enum for the systems relating to hierarchy upkeep

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

Functions

Function for despawning an entity and all its children

Updates parents when the hierarchy is changed