Module ambient_api::prelude::entity

source ·
Expand description

Manipulation, creation, removal, search and more for entities.

Structs

Functions

  • Adds child as a child to entity.
  • Adds the component component for entity with value. Will replace an existing component if present.
  • Adds the component with value to entity if entity does not already have that component.
  • Adds the components components for entity with value. Will replace any existing components specified in components.
  • 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 empty Entity if no components are found.
  • Retrieves the component component for entity if it exists, or None if it doesn’t.
  • Retrieves the components components for entity. Will return an empty Entity 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 a component.
  • Checks if the entity has components.
  • Gets all of the entities within radius of position.
  • Mutates the component component for entity using the passed in mutator, and returns its value.
  • Mutates the component component for entity using the passed in mutator, or sets it to default 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 to entity.
  • Removes the component from entity.
  • Removes the components from entity.
  • Gets the resource entity. The components of this entity contain global state for this ECS world.
  • Sets the component component for entity with value.
  • Sets the component component for entity with value if the new value is different from the current value
  • Sets the components components for entity with value.
  • 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 the component. If the entity was deleted, the method returns None.