IEditorModeFactory

Class responsible for maintaining a list of registered editor mode types.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

UnrealEd

Header

/Engine/Source/Editor/UnrealEd/Public/EditorModeRegistry.h

Include

#include "EditorModeRegistry.h"

Syntax

struct IEditorModeFactory : public TSharedFromThis< IEditorModeFactory >

Remarks

Class responsible for maintaining a list of registered editor mode types.

Example usage:

Register your mode type with: FEditorModeRegistry::Get().RegisterMode<FMyEditorMode>( FName ) ); or: class FMyEditorModeFactory : public IEditorModeFactory { virtual void OnSelectionChanged( FEditorModeTools& Tools, UObject* ItemUndergoingChange ) const override; virtual FEditorModeInfoGetModeInfo() const override; virtual TSharedRef<FEdMode> CreateMode() const override; }; TSharedRef<FMyEditorModeFactory> Factory = MakeShareable( new FMyEditorModeFactory ); FEditorModeRegistry::Get().RegisterMode( FName ), Factory );

Unregister your mode when it is no longer available like so (this will prompt the destruction of any existing modes of this type): FEditorModeRegistry::Get().UnregisterMode( FName ) );

Destructors

Name Description

Public function Virtual

~IEditorModeFactory()

Virtual destructor

Functions

Name Description

Public function Const

TSharedRef< ...

 

CreateMode()

Create a new instance of our mode

Public function Const

FEditorModeI...

 

GetModeInfo()

Gets the information pertaining to the mode type that this factory creates

Public function Virtual Const

void

 

OnSelectionChanged

(
    FEditorModeTools& Tools,
    UObject* ItemUndergoingChange
)

Allows mode factories to handle selection change events, and potentially activate/deactivate modes

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss