Inherits AzToolsFramework::Prefab::InstanceToTemplateInterface.
|
| AZ_RTTI (InstanceToTemplatePropagator, "{526F7B55-84F9-4EA9-8180-19C5DBCD0103}", InstanceToTemplateInterface) |
|
| AZ_CLASS_ALLOCATOR (InstanceToTemplatePropagator, AZ::SystemAllocator) |
|
void | RegisterInstanceToTemplateInterface () |
|
void | UnregisterInstanceToTemplateInterface () |
|
bool | GenerateEntityDomBySerializing (PrefabDom &entityDom, const AZ::Entity &entity) override |
|
bool | GenerateInstanceDomBySerializing (PrefabDom &instanceDom, const Instance &instance) override |
|
bool | GeneratePatch (PrefabDom &generatedPatch, const PrefabDomValue &initialState, const PrefabDomValue &modifiedState) override |
| Generates a patch using serialization system and places the result in generatedPatch.
|
|
bool | GeneratePatchForLink (PrefabDom &generatedPatch, const PrefabDom &initialState, const PrefabDom &modifiedState, LinkId linkId) override |
| Generates a patch to be associated with a link with the given LinkId and places the result in generatedPatch.
|
|
bool | PatchEntityInTemplate (PrefabDom &providedPatch, AZ::EntityId entityId) override |
| Updates the affected template for a given entityId using the providedPatch.
|
|
AZStd::string | GenerateEntityAliasPath (AZ::EntityId entityId) override |
|
AZ::Dom::Path | GenerateEntityPathFromFocusedPrefab (AZ::EntityId entityId) override |
|
void | PrependEntityAliasPathToPatchPaths (PrefabDom &patches, AZ::EntityId entityId, const AZStd::string &pathPrefix="") override |
|
void | PrependPathToPatchPaths (PrefabDom &patches, const AZStd::string &pathToPrepend) override |
|
InstanceOptionalReference | GetTopMostInstanceInHierarchy (AZ::EntityId entityId) override |
|
bool | PatchTemplate (PrefabDomValue &providedPatch, TemplateId templateId, InstanceOptionalConstReference instanceToExclude=AZStd::nullopt) override |
|
void | ApplyPatchesToInstance (const AZ::EntityId &entityId, PrefabDom &patches, const Instance &instanceToAddPatches) override |
|
◆ ApplyPatchesToInstance()
void AzToolsFramework::Prefab::InstanceToTemplatePropagator::ApplyPatchesToInstance |
( |
const AZ::EntityId & |
entityId, |
|
|
PrefabDom & |
patches, |
|
|
const Instance & |
instanceToAddPatches |
|
) |
| |
|
overridevirtual |
◆ GenerateEntityAliasPath()
AZStd::string AzToolsFramework::Prefab::InstanceToTemplatePropagator::GenerateEntityAliasPath |
( |
AZ::EntityId |
entityId | ) |
|
|
overridevirtual |
Generates a string matching the path to the entity alias corresponding to the entity id.
- Parameters
-
entityId | The entity id to use for generating alias path |
- Returns
- The string matching the path to the entity alias
Implements AzToolsFramework::Prefab::InstanceToTemplateInterface.
◆ GenerateEntityDomBySerializing()
bool AzToolsFramework::Prefab::InstanceToTemplatePropagator::GenerateEntityDomBySerializing |
( |
PrefabDom & |
entityDom, |
|
|
const AZ::Entity & |
entity |
|
) |
| |
|
overridevirtual |
Generates an entity DOM for the entity in its current state by serializing the entity object.
- Parameters
-
[out] | entityDom | The output entity DOM that will be modified. |
| entity | The given entity object. |
- Returns
- True if the entity DOM is generated successfully and false otherwise.
Implements AzToolsFramework::Prefab::InstanceToTemplateInterface.
◆ GenerateEntityPathFromFocusedPrefab()
AZ::Dom::Path AzToolsFramework::Prefab::InstanceToTemplatePropagator::GenerateEntityPathFromFocusedPrefab |
( |
AZ::EntityId |
entityId | ) |
|
|
overridevirtual |
◆ GenerateInstanceDomBySerializing()
bool AzToolsFramework::Prefab::InstanceToTemplatePropagator::GenerateInstanceDomBySerializing |
( |
PrefabDom & |
instanceDom, |
|
|
const Instance & |
instance |
|
) |
| |
|
overridevirtual |
Generates an instance DOM for the instance in its current state by serializing the instance object.
- Parameters
-
[out] | instanceDom | The output instance DOM that will be modified. |
| instance | The given instance object. |
- Returns
- True if the instance DOM is generated successfully and false otherwise.
Implements AzToolsFramework::Prefab::InstanceToTemplateInterface.
◆ GeneratePatch()
bool AzToolsFramework::Prefab::InstanceToTemplatePropagator::GeneratePatch |
( |
PrefabDom & |
generatedPatch, |
|
|
const PrefabDomValue & |
initialState, |
|
|
const PrefabDomValue & |
modifiedState |
|
) |
| |
|
overridevirtual |
◆ GeneratePatchForLink()
bool AzToolsFramework::Prefab::InstanceToTemplatePropagator::GeneratePatchForLink |
( |
PrefabDom & |
generatedPatch, |
|
|
const PrefabDom & |
initialState, |
|
|
const PrefabDom & |
modifiedState, |
|
|
LinkId |
linkId |
|
) |
| |
|
overridevirtual |
◆ GetTopMostInstanceInHierarchy()
InstanceOptionalReference AzToolsFramework::Prefab::InstanceToTemplatePropagator::GetTopMostInstanceInHierarchy |
( |
AZ::EntityId |
entityId | ) |
|
|
overridevirtual |
◆ PatchEntityInTemplate()
bool AzToolsFramework::Prefab::InstanceToTemplatePropagator::PatchEntityInTemplate |
( |
PrefabDom & |
providedPatch, |
|
|
AZ::EntityId |
entityId |
|
) |
| |
|
overridevirtual |
◆ PatchTemplate()
bool AzToolsFramework::Prefab::InstanceToTemplatePropagator::PatchTemplate |
( |
PrefabDomValue & |
providedPatch, |
|
|
TemplateId |
templateId, |
|
|
InstanceOptionalConstReference |
instanceToExclude = AZStd::nullopt |
|
) |
| |
|
overridevirtual |
Updates the template links (updating instances) for the given template and triggers propagation on its instances.
- Parameters
-
providedPatch | The patch to apply to the template. |
templateId | The id of the template to update. |
instanceToExclude | An optional reference to an instance of the template being updated that should not be refreshes as part of propagation. Defaults to nullopt, which means that all instances will be refreshed. |
- Returns
- True if the template was patched correctly, false if the operation failed.
Implements AzToolsFramework::Prefab::InstanceToTemplateInterface.
◆ PrependEntityAliasPathToPatchPaths()
void AzToolsFramework::Prefab::InstanceToTemplatePropagator::PrependEntityAliasPathToPatchPaths |
( |
PrefabDom & |
patches, |
|
|
AZ::EntityId |
entityId, |
|
|
const AZStd::string & |
pathPrefix = "" |
|
) |
| |
|
overridevirtual |
Prepends an entity alias path to paths in the provided patch array.
- Parameters
-
patches | The patches that contains paths to prepend the given path to. |
entityId | The entity id to use for generating entity alias path. |
pathPrefix | The prefix that will be added in front of the generated entity alias path from entity id. |
Implements AzToolsFramework::Prefab::InstanceToTemplateInterface.
◆ PrependPathToPatchPaths()
void AzToolsFramework::Prefab::InstanceToTemplatePropagator::PrependPathToPatchPaths |
( |
PrefabDom & |
patches, |
|
|
const AZStd::string & |
pathToPrepend |
|
) |
| |
|
overridevirtual |
The documentation for this class was generated from the following file:
- Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/Instance/InstanceToTemplatePropagator.h