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::PrefabFocusInterface Class Referenceabstract

Interface to handle internal operations related to the Prefab Focus system. More...

#include <PrefabFocusInterface.h>

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

Public Member Functions

 AZ_RTTI (PrefabFocusInterface, "{F3CFA37B-5FD8-436A-9C30-60EB54E350E1}")
 
virtual void InitializeEditorInterfaces ()=0
 
virtual PrefabFocusOperationResult FocusOnPrefabInstanceOwningEntityId (AZ::EntityId entityId)=0
 
virtual TemplateId GetFocusedPrefabTemplateId (AzFramework::EntityContextId entityContextId) const =0
 
virtual InstanceOptionalReference GetFocusedPrefabInstance (AzFramework::EntityContextId entityContextId) const =0
 
virtual bool IsFocusedPrefabInstanceReadOnly (AzFramework::EntityContextId entityContextId) const =0
 
virtual LinkId PrependPathFromFocusedInstanceToPatchPaths (PrefabDom &patches, AZ::EntityId entityId) const =0
 

Detailed Description

Interface to handle internal operations related to the Prefab Focus system.

Member Function Documentation

◆ FocusOnPrefabInstanceOwningEntityId()

virtual PrefabFocusOperationResult AzToolsFramework::Prefab::PrefabFocusInterface::FocusOnPrefabInstanceOwningEntityId ( AZ::EntityId  entityId)
pure virtual

Sets the focused instance to the owning instance of the entity id provided. If the entity id is invalid, then focus on the root prefab instance.

Parameters
EntityIdThe entity id of the entity whose owning instance we want the prefab system to focus on.
Returns
PrefabFocusOperationResult that shows if the operation succeeds.

Implemented in AzToolsFramework::Prefab::PrefabFocusHandler.

◆ GetFocusedPrefabInstance()

virtual InstanceOptionalReference AzToolsFramework::Prefab::PrefabFocusInterface::GetFocusedPrefabInstance ( AzFramework::EntityContextId  entityContextId) const
pure virtual

Returns a reference to the currently focused instance.

Parameters
EntityContextIdThe entity context id.
Returns
The focused instance.

Implemented in AzToolsFramework::Prefab::PrefabFocusHandler.

◆ GetFocusedPrefabTemplateId()

virtual TemplateId AzToolsFramework::Prefab::PrefabFocusInterface::GetFocusedPrefabTemplateId ( AzFramework::EntityContextId  entityContextId) const
pure virtual

Returns the template id of the currently focused instance.

Parameters
entityContextIdThe entity context id.
Returns
TemplateId of the focused instance.

Implemented in AzToolsFramework::Prefab::PrefabFocusHandler.

◆ InitializeEditorInterfaces()

virtual void AzToolsFramework::Prefab::PrefabFocusInterface::InitializeEditorInterfaces ( )
pure virtual

Initializes the editor interfaces for Prefab Focus mode. If this is not called on initialization, the Prefab Focus Mode functions will still work but won't trigger the Editor APIs to visualize focus mode on the UI.

Implemented in AzToolsFramework::Prefab::PrefabFocusHandler.

◆ IsFocusedPrefabInstanceReadOnly()

virtual bool AzToolsFramework::Prefab::PrefabFocusInterface::IsFocusedPrefabInstanceReadOnly ( AzFramework::EntityContextId  entityContextId) const
pure virtual

Returns whether the currently focused prefab instance is read-only.

Parameters
EntityContextIdThe entity context id.
Returns
True if the currently focused prefab instance is read-only, false otherwise.

Implemented in AzToolsFramework::Prefab::PrefabFocusHandler.

◆ PrependPathFromFocusedInstanceToPatchPaths()

virtual LinkId AzToolsFramework::Prefab::PrefabFocusInterface::PrependPathFromFocusedInstanceToPatchPaths ( PrefabDom &  patches,
AZ::EntityId  entityId 
) const
pure virtual

Prepends the path from the focused instance to entity id into the provided patch array.

Parameters
patchesThe provided patch array to prepend path to.
Returns
LinkId stored in the instance closest to the focused instance in hierarchy.

Implemented in AzToolsFramework::Prefab::PrefabFocusHandler.


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