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::ComponentModeFramework::ComponentModeDelegate Class Reference

#include <ComponentModeDelegate.h>

Inherits ComponentModeDelegateRequestBus::Handler, EntitySelectionEvents::Bus::Handler, EditorEntityVisibilityNotificationBus::Handler, and EditorEntityLockComponentNotificationBus::Handler.

Public Member Functions

template<typename EditorComponentType >
void Connect (const AZ::EntityComponentIdPair &entityComponentIdPair, EditorComponentSelectionRequestsBus::Handler *handler)
 
template<typename EditorComponentType , typename EditorComponentModeType , typename ... Params>
void ConnectWithSingleComponentMode (const AZ::EntityComponentIdPair &entityComponentIdPair, EditorComponentSelectionRequestsBus::Handler *handler, Params &&... params)
 
void Disconnect ()
 Disconnect the ComponentModeDelegate to stop listening for Editor selection events.
 
bool AddedToComponentMode () const
 
void SetAddComponentModeCallback (const AZStd::function< void(const AZ::EntityComponentIdPair &)> &addComponentModeCallback)
 The function to call when this ComponentModeDelegate detects an event to enter ComponentMode.
 
bool IsConnected () const
 Is the EntityComponentIdPair connected to the ComponentModeDelegate.
 

Detailed Description

Helper to provide ComponentMode button in the Entity Inspector and double click handling in the viewport for entering/exiting ComponentMode.

Member Function Documentation

◆ AddedToComponentMode()

bool AzToolsFramework::ComponentModeFramework::ComponentModeDelegate::AddedToComponentMode ( ) const

Has this specific ComponentModeDelegate (for a specific Entity and Component) been added to ComponentMode.

◆ Connect()

template<typename EditorComponentType >
void AzToolsFramework::ComponentModeFramework::ComponentModeDelegate::Connect ( const AZ::EntityComponentIdPair &  entityComponentIdPair,
EditorComponentSelectionRequestsBus::Handler *  handler 
)
inline

Connect the ComponentModeDelegate to listen for Editor selection events. Editor Component must call Connect (or variant of Connect), usually in Component::Activate, and Disconnect, most likely in Component::Deactivate.

◆ ConnectWithSingleComponentMode()

template<typename EditorComponentType , typename EditorComponentModeType , typename ... Params>
void AzToolsFramework::ComponentModeFramework::ComponentModeDelegate::ConnectWithSingleComponentMode ( const AZ::EntityComponentIdPair &  entityComponentIdPair,
EditorComponentSelectionRequestsBus::Handler *  handler,
Params &&...  params 
)
inline

Connect the ComponentModeDelegate to listen for Editor selection events and simultaneously add a single concrete ComponentMode (common case utility).


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