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 | |
Entity & | operator= (const Entity &other)=delete |
Entity (Entity &&other)=default | |
Entity & | operator= (Entity &&other)=default |
virtual | ~Entity () |
void | Reset () |
Resets the state to default. | |
EntityId | GetId () const |
const AZStd::string & | GetName () 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) |
Component * | CreateComponent (const Uuid &componentTypeId) |
bool | AddComponent (Component *component) |
bool | RemoveComponent (Component *component) |
const ComponentArrayType & | GetComponents () const |
Component * | FindComponent (ComponentId id) const |
Component * | FindComponent (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 |
TransformInterface * | GetTransform () 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::string > | StringWarningArray |
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. | |
TransformInterface * | m_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. | |