Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::EntityUtils::EntityIdAccessor Class Referencefinal

Inherits AZ::Entity.

Public Member Functions

void ForceSetId (AZ::EntityId id)
 
- Public Member Functions inherited from AZ::Entity
 AZ_CLASS_ALLOCATOR (Entity, SystemAllocator)
 Specifies that this class should use AZ::SystemAllocator for memory management by default.
 
 AZ_RTTI (AZ::Entity, "{75651658-8663-478D-9090-2432DFCAFA44}")
 Adds run-time type information to this class.
 
 Entity (AZStd::string name={})
 
 Entity (const EntityId &id, AZStd::string name={})
 
 Entity (const Entity &other)=delete
 
Entityoperator= (const Entity &other)=delete
 
 Entity (Entity &&other)=default
 
Entityoperator= (Entity &&other)=default
 
virtual ~Entity ()
 
void Reset ()
 Resets the state to default.
 
EntityId GetId () const
 
const AZStd::stringGetName () const
 
void SetName (AZStd::string name)
 
State GetState () const
 
u32 GetEntitySpawnTicketId () const
 
void SetEntitySpawnTicketId (u32 entitySpawnTicketId)
 
void AddStateEventHandler (EntityStateEvent::Handler &handler)
 
void SetId (const EntityId &id)
 
virtual void Init ()
 
virtual void Activate ()
 
virtual void Deactivate ()
 
template<class ComponentType , typename... Args>
ComponentType * CreateComponent (Args &&... args)
 
ComponentCreateComponent (const Uuid &componentTypeId)
 
bool AddComponent (Component *component)
 
bool RemoveComponent (Component *component)
 
const ComponentArrayTypeGetComponents () const
 
ComponentFindComponent (ComponentId id) const
 
ComponentFindComponent (const Uuid &typeId) const
 
template<class ComponentType >
ComponentType * FindComponent (ComponentId id) const
 
template<class ComponentType >
ComponentType * FindComponent () const
 
ComponentArrayType FindComponents (const Uuid &typeId) const
 
template<class ComponentType >
AZStd::vector< ComponentType * > FindComponents () const
 Return a vector of all the components of the specified type in an entity.
 
void InvalidateDependencies ()
 
DependencySortOutcome EvaluateDependenciesGetDetails ()
 
DependencySortResult EvaluateDependencies ()
 
void SetRuntimeActiveByDefault (bool activeByDefault)
 
bool IsRuntimeActiveByDefault () const
 
TransformInterfaceGetTransform () const
 

Additional Inherited Members

- Public Types inherited from AZ::Entity
enum class  State : u8 {
  Constructed , Initializing , Init , Activating ,
  Active , Deactivating , Destroying , Destroyed
}
 
enum class  DependencySortResult {
  Success = 0 , MissingRequiredService , HasCyclicDependency , HasIncompatibleServices ,
  DescriptorNotRegistered , DSR_OK = Success , DSR_MISSING_REQUIRED = MissingRequiredService , DSR_CYCLIC_DEPENDENCY = HasCyclicDependency
}
 
typedef AZStd::vector< Component * > ComponentArrayType
 
typedef AZStd::vector< AZStd::stringStringWarningArray
 This type of array is used by the warning.
 
using EntityStateEvent = Event< State, State >
 An event that signals old state and new state during entity state changes.
 
using DependencySortOutcome = AZ::Outcome< void, FailedSortDetails >
 
- Static Public Member Functions inherited from AZ::Entity
static void Reflect (ReflectContext *reflection)
 
static EntityId MakeId ()
 
static AZ::u32 GetProcessSignature ()
 
static DependencySortOutcome DependencySort (ComponentArrayType &components)
 
- Protected Member Functions inherited from AZ::Entity
void SetState (State state)
 
void OnNameChanged () const
 Signals to listeners that the entity's name has changed.
 
bool CanAddRemoveComponents () const
 
- Static Protected Member Functions inherited from AZ::Entity
static void ActivateComponent (Component &component)
 
static void DeactivateComponent (Component &component)
 
- Protected Attributes inherited from AZ::Entity
EntityId m_id
 
ComponentArrayType m_components
 An array of components attached to the entity.
 
EntityStateEvent m_stateEvent
 An event used to signal all entity state changes.
 
TransformInterfacem_transform
 
AZStd::string m_name
 A user-friendly name for the entity. This makes error messages easier to read.
 
u32 m_entitySpawnTicketId = 0
 
State m_state
 The state of the entity.
 
bool m_isDependencyReady
 Indicates the component dependencies have been evaluated and sorting was completed successfully.
 
bool m_isRuntimeActiveByDefault
 Indicates the entity should be activated on initial creation.
 

The documentation for this class was generated from the following file: