Open 3D Engine AzToolsFramework 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.
AzToolsFramework::Prefab::PrefabSystemComponentInterface Class Referenceabstract

#include <PrefabSystemComponentInterface.h>

Inherited by AzToolsFramework::Prefab::PrefabSystemComponent [private].

Public Types

using InstantiatedEntitiesCallback = AZStd::function< void(AZStd::vector< AZ::Entity * > &)>
 

Public Member Functions

 AZ_RTTI (PrefabSystemComponentInterface, "{8E95A029-67F9-4F74-895F-DDBFE29516A0}")
 
virtual TemplateReference FindTemplate (TemplateId id)=0
 
virtual LinkReference FindLink (const LinkId &id)=0
 
virtual TemplateId AddTemplate (const AZ::IO::Path &filePath, PrefabDom prefabDom)=0
 
virtual void UpdateTemplateFilePath (TemplateId templateId, const AZ::IO::PathView &filePath)=0
 
virtual void RemoveTemplate (TemplateId templateId)=0
 
virtual void RemoveAllTemplates ()=0
 
virtual LinkId AddLink (TemplateId sourceTemplateId, TemplateId targetTemplateId, PrefabDomValue::MemberIterator &instanceIterator, InstanceOptionalReference instance)=0
 
virtual LinkId CreateLink (TemplateId linkTargetId, TemplateId linkSourceId, const InstanceAlias &instanceAlias, const PrefabDomConstReference linkPatches, const LinkId &linkId=InvalidLinkId)=0
 
virtual bool RemoveLink (const LinkId &linkId)=0
 
virtual TemplateId GetTemplateIdFromFilePath (AZ::IO::PathView filePath) const =0
 
virtual bool IsTemplateDirty (TemplateId templateId)=0
 
virtual void SetTemplateDirtyFlag (TemplateId templateId, bool dirty)=0
 
virtual bool AreDirtyTemplatesPresent (TemplateId rootTemplateId)=0
 
virtual void SaveAllDirtyTemplates (TemplateId rootTemplateId)=0
 
virtual AZStd::set< AZ::IO::PathView > GetDirtyTemplatePaths (TemplateId rootTemplateId)=0
 
virtual PrefabDom & FindTemplateDom (TemplateId templateId)=0
 
virtual void UpdatePrefabTemplate (TemplateId templateId, const PrefabDom &updatedDom)=0
 
virtual void PropagateTemplateChanges (TemplateId templateId, InstanceOptionalConstReference instanceToExclude=AZStd::nullopt)=0
 
virtual AZStd::unique_ptr< InstanceInstantiatePrefab (AZ::IO::PathView filePath, InstanceOptionalReference parent=AZStd::nullopt, const InstantiatedEntitiesCallback &instantiatedEntitiesCallback={})=0
 
virtual AZStd::unique_ptr< InstanceInstantiatePrefab (TemplateId templateId, InstanceOptionalReference parent=AZStd::nullopt, const InstantiatedEntitiesCallback &instantiatedEntitiesCallback={})=0
 
virtual AZStd::unique_ptr< InstanceCreatePrefab (const AZStd::vector< AZ::Entity * > &entities, AZStd::vector< AZStd::unique_ptr< Instance > > &&nestedInstances, AZ::IO::PathView filePath, AZStd::unique_ptr< AZ::Entity > containerEntity=nullptr, InstanceOptionalReference parent=AZStd::nullopt, bool shouldCreateLinks=true)=0
 
virtual AZStd::unique_ptr< InstanceCreatePrefabWithCustomEntityAliases (const AZStd::map< EntityAlias, AZ::Entity * > &entities, AZStd::vector< AZStd::unique_ptr< Instance > > &&nestedInstances, AZ::IO::PathView filePath, AZStd::unique_ptr< AZ::Entity > containerEntity=nullptr, InstanceOptionalReference parent=AZStd::nullopt, bool shouldCreateLinks=true)=0
 

Detailed Description

PrefabSystemComponentInterface Interface serviced by the Prefab System Component.

Member Function Documentation

◆ AddLink()

virtual LinkId AzToolsFramework::Prefab::PrefabSystemComponentInterface::AddLink ( TemplateId  sourceTemplateId,
TemplateId  targetTemplateId,
PrefabDomValue::MemberIterator &  instanceIterator,
InstanceOptionalReference  instance 
)
pure virtual

◆ AddTemplate()

virtual TemplateId AzToolsFramework::Prefab::PrefabSystemComponentInterface::AddTemplate ( const AZ::IO::Path &  filePath,
PrefabDom  prefabDom 
)
pure virtual

◆ AreDirtyTemplatesPresent()

virtual bool AzToolsFramework::Prefab::PrefabSystemComponentInterface::AreDirtyTemplatesPresent ( TemplateId  rootTemplateId)
pure virtual

Recursive function to check if the template is dirty or if any dirty templates are presents in the links of the template.

Parameters
rootTemplateIdThe id of the template provided as the beginning template to check the outgoing links.

Implemented in AzToolsFramework::Prefab::PrefabSystemComponent.

◆ CreateLink()

virtual LinkId AzToolsFramework::Prefab::PrefabSystemComponentInterface::CreateLink ( TemplateId  linkTargetId,
TemplateId  linkSourceId,
const InstanceAlias &  instanceAlias,
const PrefabDomConstReference  linkPatches,
const LinkId &  linkId = InvalidLinkId 
)
pure virtual

◆ CreatePrefab()

virtual AZStd::unique_ptr< Instance > AzToolsFramework::Prefab::PrefabSystemComponentInterface::CreatePrefab ( const AZStd::vector< AZ::Entity * > &  entities,
AZStd::vector< AZStd::unique_ptr< Instance > > &&  nestedInstances,
AZ::IO::PathView  filePath,
AZStd::unique_ptr< AZ::Entity >  containerEntity = nullptr,
InstanceOptionalReference  parent = AZStd::nullopt,
bool  shouldCreateLinks = true 
)
pure virtual

◆ CreatePrefabWithCustomEntityAliases()

virtual AZStd::unique_ptr< Instance > AzToolsFramework::Prefab::PrefabSystemComponentInterface::CreatePrefabWithCustomEntityAliases ( const AZStd::map< EntityAlias, AZ::Entity * > &  entities,
AZStd::vector< AZStd::unique_ptr< Instance > > &&  nestedInstances,
AZ::IO::PathView  filePath,
AZStd::unique_ptr< AZ::Entity >  containerEntity = nullptr,
InstanceOptionalReference  parent = AZStd::nullopt,
bool  shouldCreateLinks = true 
)
pure virtual

Creates a prefab instance using the entities and nested instances provided.

Parameters
entitiesThe map of entities to add to the instance. Map ensures insertion order.
nestedInstancesThe instances to add to the newly created instance.
filePathThe path at which the prefab should be created.
containerEntityThe container entity for the new instance.
parentThe parent instance of the newly created instance.
Returns
The new instance created.

Implemented in AzToolsFramework::Prefab::PrefabSystemComponent.

◆ FindLink()

virtual LinkReference AzToolsFramework::Prefab::PrefabSystemComponentInterface::FindLink ( const LinkId &  id)
pure virtual

◆ FindTemplate()

virtual TemplateReference AzToolsFramework::Prefab::PrefabSystemComponentInterface::FindTemplate ( TemplateId  id)
pure virtual

◆ GetDirtyTemplatePaths()

virtual AZStd::set< AZ::IO::PathView > AzToolsFramework::Prefab::PrefabSystemComponentInterface::GetDirtyTemplatePaths ( TemplateId  rootTemplateId)
pure virtual

Recursive function that fetches the set of dirty templates given a starting template to check for outgoing links.

Parameters
rootTemplateIdThe id of the template provided as the beginning template to check the outgoing links.
Returns
The set of dirty template paths populated.

Implemented in AzToolsFramework::Prefab::PrefabSystemComponent.

◆ GetTemplateIdFromFilePath()

virtual TemplateId AzToolsFramework::Prefab::PrefabSystemComponentInterface::GetTemplateIdFromFilePath ( AZ::IO::PathView  filePath) const
pure virtual

◆ InstantiatePrefab() [1/2]

virtual AZStd::unique_ptr< Instance > AzToolsFramework::Prefab::PrefabSystemComponentInterface::InstantiatePrefab ( AZ::IO::PathView  filePath,
InstanceOptionalReference  parent = AZStd::nullopt,
const InstantiatedEntitiesCallback &  instantiatedEntitiesCallback = {} 
)
pure virtual

◆ InstantiatePrefab() [2/2]

virtual AZStd::unique_ptr< Instance > AzToolsFramework::Prefab::PrefabSystemComponentInterface::InstantiatePrefab ( TemplateId  templateId,
InstanceOptionalReference  parent = AZStd::nullopt,
const InstantiatedEntitiesCallback &  instantiatedEntitiesCallback = {} 
)
pure virtual

◆ IsTemplateDirty()

virtual bool AzToolsFramework::Prefab::PrefabSystemComponentInterface::IsTemplateDirty ( TemplateId  templateId)
pure virtual

◆ RemoveAllTemplates()

virtual void AzToolsFramework::Prefab::PrefabSystemComponentInterface::RemoveAllTemplates ( )
pure virtual

◆ RemoveLink()

virtual bool AzToolsFramework::Prefab::PrefabSystemComponentInterface::RemoveLink ( const LinkId &  linkId)
pure virtual

◆ RemoveTemplate()

virtual void AzToolsFramework::Prefab::PrefabSystemComponentInterface::RemoveTemplate ( TemplateId  templateId)
pure virtual

◆ SaveAllDirtyTemplates()

virtual void AzToolsFramework::Prefab::PrefabSystemComponentInterface::SaveAllDirtyTemplates ( TemplateId  rootTemplateId)
pure virtual

Recursive function to save if the template is dirty and save all the dirty templates in the links of the template.

Parameters
rootTemplateIdThe id of the template provided as the beginning template to check the outgoing links.

Implemented in AzToolsFramework::Prefab::PrefabSystemComponent.

◆ SetTemplateDirtyFlag()

virtual void AzToolsFramework::Prefab::PrefabSystemComponentInterface::SetTemplateDirtyFlag ( TemplateId  templateId,
bool  dirty 
)
pure virtual

◆ UpdatePrefabTemplate()

virtual void AzToolsFramework::Prefab::PrefabSystemComponentInterface::UpdatePrefabTemplate ( TemplateId  templateId,
const PrefabDom &  updatedDom 
)
pure virtual

◆ UpdateTemplateFilePath()

virtual void AzToolsFramework::Prefab::PrefabSystemComponentInterface::UpdateTemplateFilePath ( TemplateId  templateId,
const AZ::IO::PathView &  filePath 
)
pure virtual

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