Module prelude

Source
Expand description

The hierarchy prelude.

This includes the most common types in this crate, re-exported for your convenience.

Structs§

AddChild
Command that adds a child to an entity.
AddChildren
Command that pushes children to the end of the entity’s Children.
AncestorIter
An Iterator of Entitys over the ancestors of an Entity.
ChildBuilder
Struct for building children entities and adding them to a parent entity.
Children
Contains references to the child entities of this entity.
ClearChildren
Command that clears all children from an entity and removes Parent component from those children.
DescendantDepthFirstIter
An Iterator of Entitys over the descendants of an Entity.
DescendantIter
An Iterator of Entitys over the descendants of an Entity.
DespawnChildrenRecursive
Despawns the given entity’s children recursively
DespawnRecursive
Despawns the given entity and all its children recursively
HierarchyPluginbevy_app
Provides hierarchy functionality to a Bevy app.
InsertChildren
Command that inserts a child at a given index of a parent’s children, shifting following children back.
Parent
Holds a reference to the parent entity of this entity. This component should only be present on entities that actually have a parent entity.
RemoveChildren
Command that removes children from an entity, and removes these children’s parent.
RemoveParent
Command that removes the parent of an entity, and removes that entity from the parent’s Children.
ReplaceChildren
Command that clear all children from an entity, replacing them with the given children.
ValidParentCheckPlugin
Print a warning for each Entity with a T component whose parent doesn’t have a T component.
WorldChildBuilder
Struct for adding children to an entity directly through the World for use in exclusive systems.

Traits§

BuildChildren
Trait for removing, adding and replacing children and parents of an entity.
ChildBuild
Trait for building children entities and adding them to a parent entity. This is used in implementations of BuildChildren as a bound on the Builder associated type. The closure passed to BuildChildren::with_children accepts an implementation of ChildBuild so that children can be spawned via ChildBuild::spawn.
DespawnRecursiveExt
Trait that holds functions for despawning recursively down the transform hierarchy
HierarchyQueryExt
An extension trait for Query that adds hierarchy related methods.

Functions§

despawn_with_children_recursive
Function for despawning an entity and all its children