Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::SliceComponent::EntityRestoreInfo Struct Reference

#include <SliceComponent.h>

Public Member Functions

 AZ_TYPE_INFO (EntityRestoreInfo, "{AF2BE53F-C212-4BA4-880C-E1859BE75EA9}")
 
 EntityRestoreInfo (const Data::Asset< SliceAsset > &asset, const SliceInstanceId &instanceId, const EntityId &ancestorId, const DataPatch::FlagsMap &dataFlags)
 
 operator bool () const
 

Public Attributes

Data::AssetId m_assetId
 
SliceInstanceId m_instanceId
 
EntityId m_ancestorId
 
DataPatch::FlagsMap m_dataFlags
 

Detailed Description

Stores information required to restore an entity back into an internal slice instance, which includes the address of the reference and owning instance at the time of capture. EntityRestoreInfo must be retrieved via SliceReference::GetEntityRestoreInfo(). It can then be provided to SliceComponent::RestoreEntity() to restore the entity, at which point the owning reference and instance will be re-created if needed.

Constructor & Destructor Documentation

◆ EntityRestoreInfo()

AZ::SliceComponent::EntityRestoreInfo::EntityRestoreInfo ( const Data::Asset< SliceAsset > &  asset,
const SliceInstanceId instanceId,
const EntityId ancestorId,
const DataPatch::FlagsMap dataFlags 
)
inline
Parameters
assetThe source slice asset of the slice instance containing the to-be-restored entity.
instanceIdThe Id of the slice instance that manages local data patches for its entities, including the entity in question.
ancestorIdThe Id of the entity defined in the source slice asset, that is the immediate ancestor of the to-be-restored entity.
dataFlagsA copy of the slice instance data flags before the entity is removed.

The documentation for this struct was generated from the following file: