Interface for
AzFramework::EntityContextRequestBus
, which is the EBus that makes requests to a given entity context.
More...
Inherits
AZ::EBusTraits
.
|
virtual AZ::SliceComponent *
|
GetRootSlice
()=0
|
|
Retrieves the root slice of the entity context.
More...
|
|
virtual
AZ::Entity
*
|
CreateEntity
(const char *name)=0
|
|
Creates an entity and adds it to the root slice of the entity context.
More...
|
|
virtual void
|
AddEntity
(
AZ::Entity
*entity)=0
|
|
Adds an entity to the root slice of the entity context.
More...
|
|
virtual bool
|
DestroyEntity
(
AZ::Entity
*entity)=0
|
|
Removes an entity from the entity context's root slice and destroys the entity.
More...
|
|
virtual bool
|
DestroyEntity
(
AZ::EntityId
entityId)=0
|
|
Removes an entity from the entity context's root slice and destroys the entity.
More...
|
|
virtual
AZ::Entity
*
|
CloneEntity
(const
AZ::Entity
&sourceEntity)=0
|
|
Creates a copy of the entity in the root slice of the entity context.
More...
|
|
virtual const AZ::SliceComponent::EntityIdToEntityIdMap &
|
GetLoadedEntityIdMap
()=0
|
|
Returns a mapping of stream-loaded entity IDs to remapped entity IDs, if remapping was performed.
More...
|
|
virtual void
|
ResetContext
()=0
|
|
Clears the entity context by destroying all entities and slice instances that the entity context owns.
More...
|
|
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.
◆
AddEntity()
virtual void AzFramework::EntityContextRequests::AddEntity
|
(
|
AZ::Entity
*
|
entity
|
)
|
|
|
pure virtual
|
Adds an entity to the root slice of 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 root slice of 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 root slice of the entity context.
-
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.
◆
DestroyEntity()
[1/2]
virtual bool AzFramework::EntityContextRequests::DestroyEntity
|
(
|
AZ::Entity
*
|
entity
|
)
|
|
|
pure virtual
|
Removes an entity from the entity context's root slice 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.
◆
DestroyEntity()
[2/2]
virtual bool AzFramework::EntityContextRequests::DestroyEntity
|
(
|
AZ::EntityId
|
entityId
|
)
|
|
|
pure virtual
|
Removes an entity from the entity context's root slice 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.
◆
GetLoadedEntityIdMap()
virtual const AZ::SliceComponent::EntityIdToEntityIdMap& AzFramework::EntityContextRequests::GetLoadedEntityIdMap
|
(
|
|
)
|
|
|
pure virtual
|
Returns a mapping of stream-loaded entity IDs to remapped entity IDs, if remapping was performed.
-
Returns
-
A mapping of entity IDs loaded from a stream to remapped values. If the stream was loaded without remapping enabled, the map will be empty.
◆
GetRootSlice()
virtual AZ::SliceComponent* AzFramework::EntityContextRequests::GetRootSlice
|
(
|
|
)
|
|
|
pure virtual
|
Retrieves the root slice of the entity context.
Each entity context has a root slice, which contains all the entities within the context.
-
Returns
-
A pointer to the root slice.
◆
ResetContext()
virtual void AzFramework::EntityContextRequests::ResetContext
|
(
|
|
)
|
|
|
pure virtual
|
Clears the entity context by destroying all entities and slice instances that the entity context owns.
◆
AddressPolicy
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: