#include <SliceComponent.h>
Public Member Functions | |
AZ_TYPE_INFO (SliceInstance, "{E6F11FB3-E9BF-43BA-BD78-2A19F51D0ED3}") | |
SliceInstance (const SliceInstanceId &id=SliceInstanceId::CreateRandom()) | |
SliceInstance (SliceInstance &&rhs) | |
SliceInstance (const SliceInstance &rhs) | |
SliceInstance & | operator= (const SliceInstance &rhs) |
void | ClearInstantiated () |
Clears the instantiated container. Used when layers are borrowing and returning slice instances. | |
const InstantiatedContainer * | GetInstantiated () const |
Returns pointer to the instantiated entities. Null if the slice was not instantiated. | |
const DataPatch & | GetDataPatch () const |
Returns a reference to the data patch, it's always available even when the DataPatch contain no data to apply (no deltas) | |
const DataFlagsPerEntity & | GetDataFlags () const |
Returns a reference to the data flags per entity. | |
DataFlagsPerEntity & | GetDataFlags () |
Returns a reference to the data flags per entity. | |
EntityIdToEntityIdMap & | GetEntityIdMapForEdit () |
const EntityIdToEntityIdMap & | GetEntityIdMap () const |
const EntityIdToEntityIdMap & | GetEntityIdToBaseMap () const |
bool | IsValidEntity (EntityId entityId) const |
Returns whether this entity exists in this instance. | |
const SliceInstanceId & | GetId () const |
Returns the instance's unique Id. | |
operator size_t () const | |
Entity * | GetMetadataEntity () const |
Protected Member Functions | |
void | SetId (const SliceInstanceId &id) |
DataPatch::FlagsMap | GetDataFlagsForPatching () const |
Returns data flags whose addresses align with those in the data patch. | |
void | BuildReverseLookUp () const |
Static Protected Member Functions | |
static DataFlagsPerEntity::IsValidEntityFunction | GenerateValidEntityFunction (const SliceInstance *) |
Protected Attributes | |
InstantiatedContainer * | m_instantiated |
Runtime only list of instantiated objects (serialization stores the delta m_dataPatch only) | |
EntityIdToEntityIdMap | m_entityIdToBaseCache |
reverse lookup to m_baseToNewEntityIdMap, this is build on demand | |
EntityIdToEntityIdMap | m_baseToNewEntityIdMap |
Map of old entityId to new. | |
DataPatch | m_dataPatch |
Stored data patch which will take us from the dependent slice to the instantiated entities. Addresses are relative to the InstantiatedContainer. | |
DataFlagsPerEntity | m_dataFlags |
For each entity, flags which may affect slice data inheritance. Addresses are relative to the entity, not the InstantiatedContainer. | |
SliceInstanceId | m_instanceId |
Unique Id of the instance. | |
Entity * | m_metadataEntity |
Friends | |
class | SliceComponent |
Represents a slice instance in the current slice. For example if you refer to a base slice "lamppost" you can have multiple instances of that slice (all of them with custom overrides) in the current slice.
|
inline |
Returns a mapping of the EntityIDs from the base entities, to the new EntityIDs of the entities we will instantiate with this instance. @Note: This map may contain mappings to inactive entities.
|
inline |
Returns a non-const mapping of the EntityIDs from the base entities, to the new EntityIDs of the entities we will instantiate with this instance. Marks the reverse lookup table dirty by clearing it @Note: This map may contain mappings to inactive entities. @Note: Editing this map will impact future instantiations of this instance. From what entities it instantiates from base to the ids of the entities it instantiates
|
inline |
Returns the reverse of GetEntityIdMap. The reverse table is built on demand. @Note: This map may contain mappings to inactive entities.
|
protected |
Pointer to the clone metadata entity associated with the asset used to instantiate this class. Data is owned the m_instantiated member of this class.