Language:
Discover
By Skill Level
By Category

FEditorModeInfo

Choose your OS:

Syntax

struct FEditorModeInfo

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 FEditorModeInfo GetModeInfo() 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 ) );

Variables

Name Description

Public variable

bool

 

bVisible

Whether or not the mode should be visible in the mode menu

Public variable

FSlateIcon

 

IconBrush

The mode icon

Public variable

FEditorModeID

 

ID

The mode ID

Public variable

FText

 

Name

Name for the editor to display

Public variable

int32

 

PriorityOrder

The priority of this mode which will determine its default order and shift+X command assignment

Constructors

Name Description

Public function

FEditorModeInfo()

Default constructor

Public function

FEditorModeInfo

(
    FEditorModeID InID,
    FText InName,
    FSlateIcon InIconBrush,
    bool bInIsVisible,
    int32 InPriorityOrder
)

Helper constructor

References

Module

UnrealEd

Header

Editor/UnrealEd/Public/EditorModeRegistry.h