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::FocusModeSystemComponent Class Referencefinal

System Component to handle the Editor Focus Mode system. More...

#include <FocusModeSystemComponent.h>

Inherits AZ::Component, AzToolsFramework::FocusModeInterface, EditorEntityInfoNotificationBus::Handler, and AzToolsFramework::Prefab::PrefabPublicNotificationBus::Handler.

Public Member Functions

 AZ_COMPONENT (FocusModeSystemComponent, "{6CE522FE-2057-4794-BD05-61E04BD8EA30}")
 
void Init () override
 
void Activate () override
 
void Deactivate () override
 
void SetFocusRoot (AZ::EntityId entityId) override
 
void ClearFocusRoot (AzFramework::EntityContextId entityContextId) override
 Clears the Editor focus, allowing the user to select the whole level again.
 
AZ::EntityId GetFocusRoot (AzFramework::EntityContextId entityContextId) override
 
bool IsFocusRoot (AZ::EntityId entityId) const override
 
const EntityIdList & GetFocusedEntities (AzFramework::EntityContextId entityContextId) override
 Returns a list of the ids of all the entities that are descendants of the focus root.
 
bool IsInFocusSubTree (AZ::EntityId entityId) const override
 Returns whether the entity id provided is part of the focused sub-tree.
 
void OnEntityInfoUpdatedAddChildEnd (AZ::EntityId parentId, AZ::EntityId childId) override
 
void OnEntityInfoUpdatedRemoveChildEnd (AZ::EntityId parentId, AZ::EntityId childId) override
 
void OnPrefabInstancePropagationEnd () override
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 
static void GetProvidedServices (AZ::ComponentDescriptor::DependencyArrayType &provided)
 
static void GetRequiredServices (AZ::ComponentDescriptor::DependencyArrayType &required)
 
static void GetIncompatibleServices (AZ::ComponentDescriptor::DependencyArrayType &incompatible)
 

Detailed Description

System Component to handle the Editor Focus Mode system.

Member Function Documentation

◆ ClearFocusRoot()

void AzToolsFramework::FocusModeSystemComponent::ClearFocusRoot ( AzFramework::EntityContextId  entityContextId)
overridevirtual

Clears the Editor focus, allowing the user to select the whole level again.

Implements AzToolsFramework::FocusModeInterface.

◆ GetFocusedEntities()

const EntityIdList & AzToolsFramework::FocusModeSystemComponent::GetFocusedEntities ( AzFramework::EntityContextId  entityContextId)
overridevirtual

Returns a list of the ids of all the entities that are descendants of the focus root.

Implements AzToolsFramework::FocusModeInterface.

◆ GetFocusRoot()

AZ::EntityId AzToolsFramework::FocusModeSystemComponent::GetFocusRoot ( AzFramework::EntityContextId  entityContextId)
overridevirtual

Returns the entity id of the root of the current Editor focus.

Returns
The entity id of the root of the Editor focus, or an invalid entity id if no focus is set.

Implements AzToolsFramework::FocusModeInterface.

◆ IsFocusRoot()

bool AzToolsFramework::FocusModeSystemComponent::IsFocusRoot ( AZ::EntityId  entityId) const
overridevirtual

Verifies if the entityId provided matches with the current focus root.

Returns
True if the entity provided is the focus root, false otherwise.

Implements AzToolsFramework::FocusModeInterface.

◆ IsInFocusSubTree()

bool AzToolsFramework::FocusModeSystemComponent::IsInFocusSubTree ( AZ::EntityId  entityId) const
overridevirtual

Returns whether the entity id provided is part of the focused sub-tree.

Implements AzToolsFramework::FocusModeInterface.

◆ SetFocusRoot()

void AzToolsFramework::FocusModeSystemComponent::SetFocusRoot ( AZ::EntityId  entityId)
overridevirtual

Sets the root entity the Editor should focus on. The Editor will only allow the user to select entities that are descendants of the EntityId provided.

Parameters
entityIdThe entityId that will become the new focus root.

Implements AzToolsFramework::FocusModeInterface.


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