Module bevy_internal::ecs::entity
source · [−]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:
| Operation | Command | Method |
|---|---|---|
| Spawn a new entity | Commands::spawn | World::spawn |
| Spawn an entity with components | Commands::spawn_bundle | — |
| Despawn an entity | EntityCommands::despawn | World::despawn |
| Insert a component to an entity | EntityCommands::insert | EntityMut::insert |
| Insert multiple components to an entity | EntityCommands::insert_bundle | EntityMut::insert_bundle |
| Remove a component from an entity | EntityCommands::remove | EntityMut::remove |
Structs
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.