Module ambient_api_core::entity
source · Expand description
Manipulation, creation, removal, search and more for entities.
Structs
- Unconverted bindgen transforms
Functions
- Adds
childas a child toentity. - Adds the component
componentforentitywithvalue. Will replace an existing component if present. - Adds the
componentwithvaluetoentityifentitydoes not already have that component. - Adds the components
componentsforentitywithvalue. Will replace any existing components specified incomponents. - Despawns
entityfrom the world.entitywill not work with any other functions afterwards. - Despawns
entityand all of its children. - Checks if the
entityexists. - Gets all of the entities that have the given
component. - Retrieves all guest-visible components for
entity. Will return an emptyEntityif no components are found. - Retrieves the component
componentforentityif it exists, orNoneif it doesn’t. - Retrieves the components
componentsforentity. Will return an emptyEntityif 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
entityhas acomponent. - Checks if the
entityhascomponents. - Gets all of the entities within
radiusofposition. - Mutates the component
componentforentityusing the passed inmutator, and returns its value. - Mutates the component
componentforentityusing the passed inmutator, or sets it todefaultif 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
childas a child toentity. - Removes the
componentfromentity. - Removes the
componentsfromentity. - Gets the resource entity. The components of this entity contain global state for this ECS world.
- Sets the component
componentforentitywithvalue. - Sets the component
componentforentitywithvalueif the new value is different from the current value - Sets the components
componentsforentitywithvalue. - 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
idhas thecomponent. If the entity was deleted, the method returnsNone.