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::EntityEvents Class Reference

#include <EntityBus.h>

Inherits AZ::ComponentBus.

Public Types

template<class Bus >
using ConnectionPolicy = EntityEventsConnectionPolicy< Bus >
 
- Public Types inherited from AZ::ComponentBus
typedef EntityId BusIdType
 
- Public Types inherited from AZ::EBusTraits
using AllocatorType = AZ::Internal::EBusEnvironmentAllocator
 
using BusIdType = NullBusId
 
using BusIdOrderCompare = NullBusIdCompare
 
using BusHandlerOrderCompare = BusHandlerCompareDefault
 
using MutexType = NullMutex
 
using EventQueueMutexType = NullMutex
 
template<class Bus >
using ConnectionPolicy = EBusConnectionPolicy< Bus >
 
template<class Context >
using StoragePolicy = EBusEnvironmentStoragePolicy< Context >
 
template<class Bus >
using RouterPolicy = EBusRouterPolicy< Bus >
 
using EventProcessingPolicy = EBusEventProcessingPolicy
 
template<typename DispatchMutex , bool IsLocklessDispatch>
using DispatchLockGuard = AZStd::conditional_t< IsLocklessDispatch, AZ::Internal::NullLockGuard< DispatchMutex >, AZStd::scoped_lock< DispatchMutex > >
 
template<typename ContextMutex >
using ConnectLockGuard = AZStd::conditional_t< AZStd::is_same_v< ContextMutex, AZ::NullMutex >, AZ::Internal::NullLockGuard< ContextMutex >, AZStd::unique_lock< ContextMutex > >
 
template<typename ContextMutex >
using BindLockGuard = AZStd::scoped_lock< ContextMutex >
 
template<typename ContextMutex >
using CallstackTrackerLockGuard = AZStd::conditional_t< AZStd::is_same_v< ContextMutex, AZ::NullMutex >, AZ::Internal::NullLockGuard< ContextMutex >, AZStd::unique_lock< ContextMutex > >
 

Public Member Functions

virtual ~EntityEvents ()
 
virtual void OnEntityExists (const AZ::EntityId &)
 
virtual void OnEntityDestruction (const AZ::EntityId &)
 
virtual void OnEntityDestroyed (const AZ::EntityId &)
 
virtual void OnEntityActivated (const AZ::EntityId &)
 
virtual void OnEntityDeactivated (const AZ::EntityId &)
 
virtual void OnEntityNameChanged (const AZStd::string &name)
 
- Public Member Functions inherited from AZ::ComponentBus
virtual ~ComponentBus ()=default
 

Additional Inherited Members

- Static Public Attributes inherited from AZ::ComponentBus
static const EBusAddressPolicy AddressPolicy = EBusAddressPolicy::ById
 
- Static Public Attributes inherited from AZ::EBusTraits
static constexpr EBusHandlerPolicy HandlerPolicy = EBusHandlerPolicy::Multiple
 
static constexpr EBusAddressPolicy AddressPolicy = EBusAddressPolicy::Single
 
static constexpr bool EnableEventQueue = false
 
static constexpr bool EventQueueingActiveByDefault = true
 
static constexpr bool EnableQueuedReferences = false
 
static constexpr bool LocklessDispatch = false
 
- Protected Member Functions inherited from AZ::EBusTraits
 ~EBusTraits ()=default
 

Detailed Description

Interface for the AZ::EntityBus, which is the EBus for notification events dispatched by a specific entity.

Member Typedef Documentation

◆ ConnectionPolicy

template<class Bus >
using AZ::EntityEvents::ConnectionPolicy = EntityEventsConnectionPolicy<Bus>

With this connection policy, AZ::EntityEvents::OnEntityExists and AZ::EntityEvents::OnEntityActivated events may be immediately dispatched when a handler connects to the bus.

Constructor & Destructor Documentation

◆ ~EntityEvents()

virtual AZ::EntityEvents::~EntityEvents ( )
inlinevirtual

Destroys the instance of the class.

Member Function Documentation

◆ OnEntityActivated()

virtual void AZ::EntityEvents::OnEntityActivated ( const AZ::EntityId )
inlinevirtual

Signals that an entity was activated. This event is dispatched after the activation of the entity is complete.
It is also dispatched immediately if the entity is already active when a handler connects to the bus.

Parameters
EntityIdThe ID of the entity that was activated.

◆ OnEntityDeactivated()

virtual void AZ::EntityEvents::OnEntityDeactivated ( const AZ::EntityId )
inlinevirtual

Signals that an entity is being deactivated. This event is dispatched immediately before the entity is deactivated.

Parameters
EntityIdThe ID of the entity that is being deactivated.

◆ OnEntityDestroyed()

virtual void AZ::EntityEvents::OnEntityDestroyed ( const AZ::EntityId )
inlinevirtual

Signals that an initialized entity has been deleted.

◆ OnEntityDestruction()

virtual void AZ::EntityEvents::OnEntityDestruction ( const AZ::EntityId )
inlinevirtual

Signals that an initialized entity is about to be deleted.

◆ OnEntityExists()

virtual void AZ::EntityEvents::OnEntityExists ( const AZ::EntityId )
inlinevirtual

Signals that an entity has come into existence. This event is dispatched after initialization of the entity. It is also dispatched to handlers immediately upon connecting to the bus if the entity has already been initialized. Note that in this case the entity may or may not be activated.

Parameters
idThe ID of the entity.

◆ OnEntityNameChanged()

virtual void AZ::EntityEvents::OnEntityNameChanged ( const AZStd::string name)
inlinevirtual

Signals that the name of an entity changed.

Parameters
nameThe new name of the entity.

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