#include <UiGameEntityContext.h>
Inherits UiEntityContext, UiGameEntityContextBus::Handler, and AzFramework::SliceInstantiationResultBus::MultiHandler.
Classes | |
struct | InstantiatingDynamicSlice |
Public Member Functions | |
UiGameEntityContext (AZ::EntityId canvasEntityId=AZ::EntityId()) | |
bool | HandleLoadedRootSliceEntity (AZ::Entity *rootEntity, bool remapIds, AZ::SliceComponent::EntityIdToEntityIdMap *idRemapTable=nullptr) |
bool | DestroyEntity (AZ::Entity *entity) override |
void | InitUiContext () override |
Initialize the entity context and instantiate the root slice. | |
void | DestroyUiContext () override |
Destroy the Entity Context. | |
bool | SaveToStreamForGame (AZ::IO::GenericStream &stream, AZ::DataStream::StreamType streamType) override |
bool | SaveCanvasEntityToStreamForGame (AZ::Entity *canvasEntity, AZ::IO::GenericStream &stream, AZ::DataStream::StreamType streamType) override |
AZ::Entity * | CreateUiEntity (const char *name) override |
void | AddUiEntity (AZ::Entity *entity) override |
void | AddUiEntities (const AzFramework::EntityList &entities) override |
bool | CloneUiEntities (const AZStd::vector< AZ::EntityId > &sourceEntities, AzFramework::EntityList &resultEntities) override |
bool | DestroyUiEntity (AZ::EntityId entityId) override |
AzFramework::SliceInstantiationTicket | InstantiateDynamicSlice (const AZ::Data::Asset< AZ::Data::AssetData > &sliceAsset, const AZ::Vector2 &position, bool isViewportPostion, AZ::Entity *parent, const AZ::IdUtils::Remapper< AZ::EntityId >::IdMapper &customIdMapper) override |
void | OnSlicePreInstantiate (const AZ::Data::AssetId &sliceAssetId, const AZ::SliceComponent::SliceInstanceAddress &instance) override |
void | OnSliceInstantiated (const AZ::Data::AssetId &sliceAssetId, const AZ::SliceComponent::SliceInstanceAddress &instance) override |
void | OnSliceInstantiationFailed (const AZ::Data::AssetId &sliceAssetId) override |
void | SetCanvasEntity (AZ::EntityId canvasEntityId) |
virtual void | InitUiContext ()=0 |
Initialize the entity context and instantiate the root slice. | |
virtual void | DestroyUiContext ()=0 |
Destroy the Entity Context. | |
virtual bool | SaveToStreamForGame (AZ::IO::GenericStream &stream, AZ::DataStream::StreamType streamType)=0 |
virtual bool | SaveCanvasEntityToStreamForGame (AZ::Entity *canvasEntity, AZ::IO::GenericStream &stream, AZ::DataStream::StreamType streamType)=0 |
Protected Attributes | |
AZStd::unordered_map< AzFramework::SliceInstantiationTicket, InstantiatingDynamicSlice > | m_instantiatingDynamicSlices |
AZ::EntityId | m_canvasEntityId |
The UiGameEntityContext is used for a canvas that is loaded in game as oppoed to being open for editing
|
overridevirtual |
Destroy the Entity Context.
Implements UiEntityContext.
|
overridevirtual |
Initialize the entity context and instantiate the root slice.
Implements UiEntityContext.
|
overridevirtual |
Saves the given canvas entity to the specified buffer. If necessary the entity undergoes conversion for game: editor -> game components.
Implements UiEntityContext.
|
overridevirtual |
Saves the context's slice root to the specified buffer. If necessary entities undergo conversion for game: editor -> game components.
Implements UiEntityContext.