Inherits AzFramework::SliceEntityOwnershipService, SliceEditorEntityOwnershipServiceRequestBus::Handler, and AzFramework::SliceInstantiationResultBus::MultiHandler.
|
using | InstantiatingSlicePair = AZStd::pair< AZ::Data::Asset< AZ::Data::AssetData >, AZ::Transform > |
|
|
| AZ_CLASS_ALLOCATOR (SliceEditorEntityOwnershipService, AZ::SystemAllocator) |
|
| SliceEditorEntityOwnershipService (const AzFramework::EntityContextId &entityContextId, AZ::SerializeContext *serializeContext) |
|
void | StartPlayInEditor (EntityIdToEntityIdMap &m_editorToRuntimeIdMap, EntityIdToEntityIdMap &m_runtimeToEditorIdMap) |
|
void | StopPlayInEditor (EntityIdToEntityIdMap &m_editorToRuntimeIdMap, EntityIdToEntityIdMap &m_runtimeToEditorIdMap) |
|
bool | SaveToStreamForEditor (AZ::IO::GenericStream &stream, const EntityList &entitiesInLayers, AZ::SliceComponent::SliceReferenceToInstancePtrs &instancesInLayers) |
|
bool | SaveToStreamForGame (AZ::IO::GenericStream &stream, AZ::DataStream::StreamType streamType) |
|
void | AssociateToRootMetadataEntity (const EntityList &entities) |
|
bool | LoadFromStreamWithLayers (AZ::IO::GenericStream &stream, QString levelPakFile) |
|
void | OnAssetReady (AZ::Data::Asset< AZ::Data::AssetData > asset) override |
|
void | OnAssetReloaded (AZ::Data::Asset< AZ::Data::AssetData > asset) override |
|
|
static void | Reflect (AZ::ReflectContext *context) |
|
|
void | HandleNewMetadataEntitiesCreated (AZ::SliceComponent &slice) override |
|
◆ AssociateToRootMetadataEntity()
void AzToolsFramework::SliceEditorEntityOwnershipService::AssociateToRootMetadataEntity |
( |
const EntityList & |
entities | ) |
|
If the entities do not belong to a slice, associate them to the root slice metdata info component.
- Parameters
-
◆ LoadFromStreamWithLayers()
bool AzToolsFramework::SliceEditorEntityOwnershipService::LoadFromStreamWithLayers |
( |
AZ::IO::GenericStream & |
stream, |
|
|
QString |
levelPakFile |
|
) |
| |
Loads the root slice of EntityOwnershipService from the specified stream, and loads any layers referenced in the level.
- Parameters
-
stream | The stream to load from. |
levelPakFile | The path to the level's pak file, which is used to find the layers. |
- Returns
- true if successfully loaded.
◆ SaveToStreamForEditor()
bool AzToolsFramework::SliceEditorEntityOwnershipService::SaveToStreamForEditor |
( |
AZ::IO::GenericStream & |
stream, |
|
|
const EntityList & |
entitiesInLayers, |
|
|
AZ::SliceComponent::SliceReferenceToInstancePtrs & |
instancesInLayers |
|
) |
| |
Saves the root slice of the entity ownership service to the specified buffer. Entities are saved as-is (with editor components).
- Parameters
-
stream | The stream to save the editor entity ownership service to. |
entitiesInLayers | A list of entities that were saved into layers. These won't be saved to the editor entity ownership service stream. |
instancesInLayers | The map of slice references to their instances that were saved into layers. These won't be saved to the editor entity ownership service stream. |
- Returns
- true if successfully saved. Failure is only possible if serialization data is corrupt.
◆ SaveToStreamForGame()
bool AzToolsFramework::SliceEditorEntityOwnershipService::SaveToStreamForGame |
( |
AZ::IO::GenericStream & |
stream, |
|
|
AZ::DataStream::StreamType |
streamType |
|
) |
| |
Saves the root slice of entity ownership serive to the specified buffer. Entities undergo conversion for game: editor -> game components.
- Parameters
-
stream | The stream to save the entity ownership service to. |
streamType | |
- Returns
- true if successfully saved. Failure is only possible if serialization data is corrupt.
◆ StartPlayInEditor()
void AzToolsFramework::SliceEditorEntityOwnershipService::StartPlayInEditor |
( |
EntityIdToEntityIdMap & |
m_editorToRuntimeIdMap, |
|
|
EntityIdToEntityIdMap & |
m_runtimeToEditorIdMap |
|
) |
| |
Switches to game mode in the editor.
- Parameters
-
m_editorToRuntimeIdMap | The entityId map of editor entities to game entities. |
m_runtimeToEditorIdMap | The entityId map of game entities to editor entities. |
◆ StopPlayInEditor()
void AzToolsFramework::SliceEditorEntityOwnershipService::StopPlayInEditor |
( |
EntityIdToEntityIdMap & |
m_editorToRuntimeIdMap, |
|
|
EntityIdToEntityIdMap & |
m_runtimeToEditorIdMap |
|
) |
| |
Stops the game mode in the editor.
- Parameters
-
m_editorToRuntimeIdMap | The entityId map of editor entities to game entities. |
m_runtimeToEditorIdMap | The entityId map of game entities to editor entities. |
The documentation for this class was generated from the following file:
- Code/Framework/AzToolsFramework/AzToolsFramework/Entity/SliceEditorEntityOwnershipService.h