Module ambient_api::entity
source · Expand description
Manipulation, creation, removal, search and more for entities.
Structs
- Unconverted bindgen transforms
Functions
- Adds
child
as a child toentity
. - Adds the component
component
forentity
withvalue
. Will replace an existing component if present. - Adds the
component
withvalue
toentity
ifentity
does not already have that component. - Adds the components
components
forentity
withvalue
. Will replace any existing components specified incomponents
. - Despawns
entity
from the world.entity
will not work with any other functions afterwards. - Despawns
entity
and all of its children. - Checks if the
entity
exists. - Gets all of the entities that have the given
component
. - Retrieves all guest-visible components for
entity
. Will return an emptyEntity
if no components are found. - Retrieves the component
component
forentity
if it exists, orNone
if it doesn’t. - Retrieves the components
components
forentity
. Will return an emptyEntity
if no components are found. - Gets a list of world transforms relative to origin entity Origin can be null entity for a list of world transforms
- Checks if the
entity
has acomponent
. - Checks if the
entity
hascomponents
. - Gets all of the entities within
radius
ofposition
. - Mutates the component
component
forentity
using the passed inmutator
, and returns its value. - Mutates the component
component
forentity
using the passed inmutator
, or sets it todefault
if it doesn’t exist, and returns its value. - Gets the persisted resource entity. The components of this entity contain global state that should be networked and persisted.
- Removes
child
as a child toentity
. - Removes the
component
fromentity
. - Removes the
components
fromentity
. - Gets the resource entity. The components of this entity contain global state for this ECS world.
- Sets the component
component
forentity
withvalue
. - Sets the component
component
forentity
withvalue
if the new value is different from the current value - Sets the components
components
forentity
withvalue
. - Spawns an entity containing the
components
. - Gets the synchronized resource entity. The components of this entity contain global state that should be networked, but not persisted.
- Waits until
id
has thecomponent
. If the entity was deleted, the method returnsNone
.