#include <EntityContextBus.h>
Inherits AZ::EBusTraits.
|
static const AZ::EBusAddressPolicy | AddressPolicy = AZ::EBusAddressPolicy::ById |
|
Interface for AzFramework::EntityContextRequestBus, which is the EBus that makes requests to a given entity context. If you want to make requests to a specific entity context, such
as the game entity context, use the interface specific to that
context. If you want to make requests to multiple types of entity
contexts, use this interface.
◆ BusIdType
Specifies that events are addressed by entity context ID.
◆ ActivateEntity()
virtual void AzFramework::EntityContextRequests::ActivateEntity |
( |
AZ::EntityId |
entityId | ) |
|
|
pure virtual |
Activates an entity that is owned by the entity context.
- Parameters
-
id | The ID of the entity to activate. |
◆ AddEntity()
virtual void AzFramework::EntityContextRequests::AddEntity |
( |
AZ::Entity * |
entity | ) |
|
|
pure virtual |
Adds an entity to the entity context. This operation does not activate the entity by default. Derived classes might choose to set the entity to another state.
- Parameters
-
entity | A pointer to the entity to add. |
◆ CloneEntity()
virtual AZ::Entity * AzFramework::EntityContextRequests::CloneEntity |
( |
const AZ::Entity & |
sourceEntity | ) |
|
|
pure virtual |
Creates a copy of the entity in the entity context. The cloned copy is assigned a unique entity ID.
- Parameters
-
sourceEntity | A reference to the entity to clone. |
- Returns
- A pointer to the cloned copy of the entity. This operation can fail if serialization data fails to interpret the source entity.
◆ CreateEntity()
virtual AZ::Entity * AzFramework::EntityContextRequests::CreateEntity |
( |
const char * |
name | ) |
|
|
pure virtual |
Creates an entity and adds it to the entity context. This operation does not activate the entity by default.
- Parameters
-
name | A name for the entity. |
- Returns
- A pointer to a new entity. This operation succeeds unless the system is completely out of memory.
◆ DeactivateEntity()
virtual void AzFramework::EntityContextRequests::DeactivateEntity |
( |
AZ::EntityId |
entityId | ) |
|
|
pure virtual |
Deactivates an entity that is owned by the entity context.
- Parameters
-
id | The ID of the entity to deactivate. |
◆ DestroyEntity()
virtual bool AzFramework::EntityContextRequests::DestroyEntity |
( |
AZ::Entity * |
entity | ) |
|
|
pure virtual |
Removes an entity from the entity context and destroys the entity.
- Parameters
-
entity | A pointer to the entity to destroy. |
- Returns
- If the entity context does not own the entity,
this returns false and does not destroy the entity.
◆ DestroyEntityById()
virtual bool AzFramework::EntityContextRequests::DestroyEntityById |
( |
AZ::EntityId |
entityId | ) |
|
|
pure virtual |
Removes an entity from the entity context and destroys the entity.
- Parameters
-
entityId | The ID of the entity to destroy. |
- Returns
- If the entity context does not own the entity, this returns false and does not destroy the entity.
◆ ResetContext()
virtual void AzFramework::EntityContextRequests::ResetContext |
( |
| ) |
|
|
pure virtual |
Clears the entity context by destroying all entities and prefab instances that the entity context owns.
◆ AddressPolicy
const AZ::EBusAddressPolicy AzFramework::EntityContextRequests::AddressPolicy = AZ::EBusAddressPolicy::ById |
|
static |
Overrides the default AZ::EBusAddressPolicy so that the EBus has multiple addresses. Events that are addressed to an ID are received by all handlers that are connected to that ID.
The documentation for this class was generated from the following file: