Module bevy::ecs::entity

Expand description

Entity handling types.

An entity exclusively owns zero or more component instances, all of different types, and can dynamically acquire or lose them over its lifetime.

See Entity to learn more.

Usage

Operations involving entities and their components are performed either from a system by submitting commands, or from the outside (or from an exclusive system) by directly using World methods:

OperationCommandMethod
Spawn an entity with componentsCommands::spawn
Spawn an entity without componentsCommands::spawn_emptyWorld::spawn_empty
Despawn an entityEntityCommands::despawnWorld::despawn
Insert a component, bundle, or tuple of components and bundles to an entityEntityCommands::insertEntityMut::insert
Remove a component, bundle, or tuple of components and bundles from an entityEntityCommands::removeEntityMut::remove

Structs

Lightweight identifier of an entity.
A location of an entity in an archetype.
A mapping from one set of entities to another.
An Iterator returning a sequence of Entity values from Entities::reserve_entities.

Enums

Traits