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

#include <PrefabFocusPublicInterface.h>

Public Member Functions

 AZ_RTTI (PrefabFocusPublicInterface, "{53EE1D18-A41F-4DB1-9B73-9448F425722E}")
 
virtual PrefabFocusOperationResult FocusOnOwningPrefab (AZ::EntityId entityId)=0
 
virtual PrefabFocusOperationResult FocusOnParentOfFocusedPrefab (AzFramework::EntityContextId entityContextId)=0
 Set the focused prefab instance to the parent of the currently focused prefab instance. Supports undo/redo.
 
virtual PrefabFocusOperationResult FocusOnPathIndex (AzFramework::EntityContextId entityContextId, int index)=0
 
virtual PrefabFocusOperationResult SetOwningPrefabInstanceOpenState (AZ::EntityId entityId, bool openState)=0
 
virtual AZ::EntityId GetFocusedPrefabContainerEntityId (AzFramework::EntityContextId entityContextId) const =0
 Returns the entity id of the container entity for the instance the prefab system is focusing on.
 
virtual bool IsOwningPrefabBeingFocused (AZ::EntityId entityId) const =0
 
virtual bool IsOwningPrefabInFocusHierarchy (AZ::EntityId entityId) const =0
 
virtual const AZ::IO::Path & GetPrefabFocusPath (AzFramework::EntityContextId entityContextId) const =0
 
virtual const int GetPrefabFocusPathLength (AzFramework::EntityContextId entityContextId) const =0
 Returns the size of the path to the currently focused instance.
 
virtual void SetPrefabEditScope (AzFramework::EntityContextId entityContextId, PrefabEditScope prefabEditScope)=0
 Sets the currently using prefab edit scope in editor.
 

Detailed Description

Public Interface for external systems to utilize the Prefab Focus system. This interface shouldn't expose internal prefab constructs like TemplateIds and prefab instances. For such cases, use the PrefabFocusInterface instead.

Member Function Documentation

◆ FocusOnOwningPrefab()

virtual PrefabFocusOperationResult AzToolsFramework::Prefab::PrefabFocusPublicInterface::FocusOnOwningPrefab ( AZ::EntityId  entityId)
pure virtual

Set the focused prefab instance to the owning instance of the entityId provided. Supports undo/redo.

Parameters
entityIdThe entityId of the entity whose owning instance we want the prefab system to focus on.

◆ FocusOnPathIndex()

virtual PrefabFocusOperationResult AzToolsFramework::Prefab::PrefabFocusPublicInterface::FocusOnPathIndex ( AzFramework::EntityContextId  entityContextId,
int  index 
)
pure virtual

Set the focused prefab instance to the instance at position index of the current path. Supports undo/redo.

Parameters
indexThe index of the instance in the current path that we want the prefab system to focus on.

◆ GetPrefabFocusPath()

virtual const AZ::IO::Path & AzToolsFramework::Prefab::PrefabFocusPublicInterface::GetPrefabFocusPath ( AzFramework::EntityContextId  entityContextId) const
pure virtual

Returns the path from the root instance to the currently focused instance.

Returns
A path composed from the names of the container entities for the instance path.

◆ IsOwningPrefabBeingFocused()

virtual bool AzToolsFramework::Prefab::PrefabFocusPublicInterface::IsOwningPrefabBeingFocused ( AZ::EntityId  entityId) const
pure virtual

Returns whether the entity belongs to the instance that is being focused on.

Parameters
entityIdThe entityId of the queried entity.
Returns
true if the entity belongs to the focused instance, false otherwise.

◆ IsOwningPrefabInFocusHierarchy()

virtual bool AzToolsFramework::Prefab::PrefabFocusPublicInterface::IsOwningPrefabInFocusHierarchy ( AZ::EntityId  entityId) const
pure virtual

Returns whether the entity belongs to the instance that is being focused on, or one of its descendants.

Parameters
entityIdThe entityId of the queried entity.
Returns
true if the entity belongs to the focused instance or one of its descendants, false otherwise.

◆ SetOwningPrefabInstanceOpenState()

virtual PrefabFocusOperationResult AzToolsFramework::Prefab::PrefabFocusPublicInterface::SetOwningPrefabInstanceOpenState ( AZ::EntityId  entityId,
bool  openState 
)
pure virtual

Opens the prefab instance owning the entityId provided.Supports undo/redo.

Parameters
entityIdThe entityId of the entity whose owning instance we want to open for overrides.

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