#include <GameEntityContextBus.h>
Inherits AZ::EBusTraits.
|
static const AZ::EBusHandlerPolicy | HandlerPolicy = AZ::EBusHandlerPolicy::Single |
|
Interface for AzFramework::GameEntityContextRequestBus, which is
the EBus that makes requests to the game entity context. The game entity context holds gameplay entities, as opposed to system entities, editor entities, and so on.
◆ ~GameEntityContextRequests()
virtual AzFramework::GameEntityContextRequests::~GameEntityContextRequests |
( |
| ) |
|
|
virtualdefault |
Destroys the instance of the class.
◆ ActivateGameEntity()
virtual void AzFramework::GameEntityContextRequests::ActivateGameEntity |
( |
const AZ::EntityId & |
| ) |
|
|
pure virtual |
Activates the game entity.
- Parameters
-
id | The ID of the entity to activate. |
◆ AddGameEntity()
virtual void AzFramework::GameEntityContextRequests::AddGameEntity |
( |
AZ::Entity * |
| ) |
|
|
pure virtual |
Adds an existing entity to the game context.
- Parameters
-
entity | A pointer to the entity to add to the game context. |
◆ CreateGameEntity()
virtual AZ::Entity * AzFramework::GameEntityContextRequests::CreateGameEntity |
( |
const char * |
| ) |
|
|
pure virtual |
Creates an entity in the game context.
- Parameters
-
name | A name for the new entity. |
- Returns
- A pointer to a new entity.
◆ CreateGameEntityForBehaviorContext()
virtual BehaviorEntity AzFramework::GameEntityContextRequests::CreateGameEntityForBehaviorContext |
( |
const char * |
| ) |
|
|
pure virtual |
Creates an entity in the game context.
- Parameters
-
name | A name for the new entity. |
- Returns
- An entity wrapper for use within the BehaviorContext.
◆ DeactivateGameEntity()
virtual void AzFramework::GameEntityContextRequests::DeactivateGameEntity |
( |
const AZ::EntityId & |
| ) |
|
|
pure virtual |
Deactivates the game entity.
- Parameters
-
id | The ID of the entity to deactivate. |
◆ DestroyGameEntity()
virtual void AzFramework::GameEntityContextRequests::DestroyGameEntity |
( |
const AZ::EntityId & |
| ) |
|
|
pure virtual |
Destroys an entity. The entity is immediately deactivated and will be destroyed on the next tick.
- Parameters
-
id | The ID of the entity to destroy. |
◆ DestroyGameEntityAndDescendants()
virtual void AzFramework::GameEntityContextRequests::DestroyGameEntityAndDescendants |
( |
const AZ::EntityId & |
| ) |
|
|
pure virtual |
Destroys an entity and all of its descendants. The entity and its descendants are immediately deactivated and will be destroyed on the next tick.
- Parameters
-
id | The ID of the entity to destroy. |
◆ GetEntityName()
virtual AZStd::string AzFramework::GameEntityContextRequests::GetEntityName |
( |
const AZ::EntityId & |
| ) |
|
|
pure virtual |
Returns the entity's name.
- Parameters
-
- Returns
- The name of the entity. Returns an empty string if the entity cannot be found.
◆ GetGameEntityContextId()
virtual EntityContextId AzFramework::GameEntityContextRequests::GetGameEntityContextId |
( |
| ) |
|
|
pure virtual |
Gets the ID of the game entity context.
- Returns
- The ID of the game entity context.
◆ LoadFromStream()
virtual bool AzFramework::GameEntityContextRequests::LoadFromStream |
( |
AZ::IO::GenericStream & |
, |
|
|
bool |
|
|
) |
| |
|
pure virtual |
Loads game entities from a stream.
- Parameters
-
stream | The stream to load the entities from. |
remapIds | Use true to remap the entity IDs after the stream is loaded. |
- Returns
- True if the stream successfully loaded. Otherwise, false. This operation
can fail if the source file is corrupt or the data could not be up-converted.
◆ ResetGameContext()
virtual void AzFramework::GameEntityContextRequests::ResetGameContext |
( |
| ) |
|
|
pure virtual |
Completely resets the game context. This includes deleting all prefabs and entities.
◆ HandlerPolicy
const AZ::EBusHandlerPolicy AzFramework::GameEntityContextRequests::HandlerPolicy = AZ::EBusHandlerPolicy::Single |
|
static |
Overrides the default AZ::EBusTraits handler policy so that this EBus supports a single handler at each address. This EBus has only
one handler because it uses the default AZ::EBusTraits address policy, and that policy specifies that the EBus has only one address.
The documentation for this class was generated from the following file: