FAssetEditorToolkit

Base class for toolkits that are used for asset editing (abstract)

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

UnrealEd

Header

/Engine/Source/Editor/UnrealEd/Public/Toolkits/AssetEditorToolkit.h

Include

#include "Toolkits/AssetEditorToolkit.h"

Syntax

class FAssetEditorToolkit :
    public IAssetEditorInstance,
    public FBaseToolkit,
    public TSharedFromThis< FAssetEditorToolkit >

Remarks

Base class for toolkits that are used for asset editing (abstract)

Variables

Name Description

Protected variable

FAssetEditorMod...

 

AssetEditorModeManager

The asset editor mode manager

Protected variable

TSharedPtr< FWo...

 

AssetEditorTabsCategory

The base category that tabs are registered to, allows for child classes to register to the same point.

Protected variable

bool

 

bCheckDirtyOnAssetSave

Whether only dirty assets should be prompted about on save - otherwise all edited assets will be prompted to the user for save/check-out

Protected variable

TArray< TShared...

 

LayoutExtenders

Array of layout extenders

Protected variable

TWeakPtr< ITool...

 

PreviousWorldCentricToolkitHost

For standalone asset editing tool-kits that were switched from world-centric mode on the fly, this stores the toolkit host (level editor) that hosted this toolkit last.

Protected variable

TSharedPtr< FTa...

 

TabManager

Controls our internal layout

Constructors

Name Description

Public function

FAssetEditorToolkit()

Default constructor

Destructors

Name Description

Public function Virtual

~FAssetEditorToolkit()

Virtual destructor, so that we can clean up our app when destroyed

Functions

Name Description

Protected function Virtual

void

 

AddEditingObject

(
    UObject* Object
)

Adds an item to the Editing Objects list

Public function Virtual Const

void

 

AddGraphEditorPinActionsToContextMenu

(
    FToolMenuSection& InSection
)

Public function

void

 

AddMenuExtender

(
    TSharedPtr< FExtender > Extender
)

Adds or removes extenders to the default menu or the toolbar menu this asset editor

Public function

void

 

AddToolbarExtender

(
    TSharedPtr< FExtender > Extender
)

Public function

void

 

AddToolbarWidget

(
    TSharedRef< SWidget > Widget
)

Adds or removes widgets from the default toolbar in this asset editor

Protected function Virtual Const

void

 

BrowseDocumentation_Execute()

Called when "Browse Documentation" is clicked for this asset

Protected function Virtual Const

bool

 

CanFindInContentBrowser()

Called to test if "Find in Content Browser" should be enabled for this asset

Protected function Virtual Const

bool

 

CanReimport

(
    UObject* EditingObject
)

Called to check to see if there's an asset capable of being reimported

Protected function Virtual Const

bool

 

CanReimport()

Called to check to see if there's an asset capable of being reimported

Protected function Virtual Const

bool

 

CanSaveAsset()

Called to test if "Save" should be enabled for this asset

Protected function Virtual Const

bool

 

CanSaveAssetAs()

Called to test if "Save As" should be enabled for this asset

Public function

void

 

FillDefaultAssetMenuCommands

(
    FToolMenuSection& InSection
)

Fills in the supplied menu with commands for modifying this asset that are generally common to most asset editors

Public function

void

 

FillDefaultFileMenuCommands

(
    FToolMenuSection& InSection
)

Fills in the supplied menu with commands for working with this asset file

Public function

void

 

FillDefaultHelpMenuCommands

(
    FToolMenuSection& InSection
)

Fills in the supplied menu with commands for the help menu

Protected function Virtual

void

 

FindInContentBrowser_Execute()

Called when "Find in Content Browser" is clicked for this asset

Public function

void

 

GenerateToolbar()

Makes a default asset editing toolbar

Public function Const

FAssetEditor...

 

GetAssetEditorModeManager()

Get the asset editor mode manager we are using

Protected function Virtual Const

FLinearColor

 

GetDefaultTabColor()

Protected function Virtual Const

const FSlate...

 

GetDefaultTabIcon()

Protected function Virtual Const

FString

 

GetDocumentationLink()

Protected function Const

UObject *...

 

GetEditingObject()

Returns the single object currently being edited.

Protected function Const

const TArray...

 

GetEditingObjects()

Returns an array of all the objects currently being edited. Asserts if editing no objects

Public function Static

FText

 

GetLabelForObject

(
    const UObject* InObject
)

Gets the text to display in a toolkit titlebar for an object

Public function

TSharedPtr< ...

 

GetPreviousWorldCentricToolkitHost()

Protected function Virtual Const

void

 

GetSaveableObjects

(
    TArray< UObject* >& OutObject...
)

Get the collection of edited objects that can be saved.

Public function Static

TSharedPtr< ...

 

GetSharedMenuExtensibilityManager()

Returns the default extensibility managers, these are applied for all asset types

Public function Static

TSharedPtr< ...

 

GetSharedToolBarExtensibilityManager()

Public function

TSharedPtr< ...

 

GetTabManager()

Public function Const

FName

 

GetToolMenuAppName()

Public function Const

FName

 

GetToolMenuName()

Public function Const

FName

 

GetToolMenuToolbarName()

Public function Virtual Const

FName

 

GetToolMenuToolbarName

(
    FName& OutParentName
)

Get name used by tool menu

Public function Static

FText

 

GetToolTipTextForObject

(
    const UObject* InObject
)

Gets the text to display in a toolkit tooltip for an object

Public function Virtual

void

 

InitAssetEditor

(
    const EToolkitMode::Type Mode,
    const TSharedPtr< IToolkitHost >& ...,
    const FName AppIdentifier,
    const TSharedRef< FTabManager::FLay...,
    const bool bCreateDefaultStandalone...,
    const bool bCreateDefaultToolbar,
    const TArray< UObject* >& Obj...,
    const bool bInIsToolbarFocusable,
    const bool bInUseSmallToolbarIcons
)

Initializes this asset editor.

Public function Virtual

void

 

InitAssetEditor

(
    const EToolkitMode::Type Mode,
    const TSharedPtr< IToolkitHost >& ...,
    const FName AppIdentifier,
    const TSharedRef< FTabManager::FLay...,
    const bool bCreateDefaultStandalone...,
    const bool bCreateDefaultToolbar,
    UObject* ObjectToEdit,
    const bool bInIsToolbarFocusable,
    const bool bInUseSmallToolbarIcons
)

Initializes this asset editor.

Public function Virtual

void

 

InitToolMenuContext

(
    FToolMenuContext& MenuContext
)

Public function Virtual

void

 

InvokeTab

(
    const FTabId& TabId
)

Public function Const

bool

 

IsActuallyAnAsset()

True if this actually is editing an asset

Protected function Virtual

bool

 

OnRequestClose()

Called when this toolkit would close

Public function Virtual

void

 

OnToolkitHostingFinished

(
    const TSharedRef< IToolkit >& Tool...
)

Called when another toolkit (such as a ed mode toolkit) is no longer being hosted in this asset editor toolkit.

Public function Virtual

void

 

OnToolkitHostingStarted

(
    const TSharedRef< IToolkit >& Tool...
)

Called when another toolkit (such as a ed mode toolkit) is being hosted in this asset editor toolkit.

Public function Virtual

void

 

PostRegenerateMenusAndToolbars()

Called at the end of RegenerateMenusAndToolbars()

Public function

void

 

RegenerateMenusAndToolbars()

Regenerates the menubar and toolbar widgets

Public function Static

void

 

RegisterDefaultToolBar()

Registers default tool bar

Protected function Virtual

void

 

Reimport_Execute()

Called when "Reimport" is clicked for this asset

Protected function Virtual

void

 

Reimport_Execute

(
    UObject* EditingObject
)

Called when "Reimport" is clicked for this asset

Public function

void

 

RemoveAllToolbarWidgets()

Protected function Virtual

void

 

RemoveEditingObject

(
    UObject* Object
)

Removes an item from the Editing Objects list

Public function

void

 

RemoveMenuExtender

(
    TSharedPtr< FExtender > Extender
)

Public function

void

 

RemoveToolbarExtender

(
    TSharedPtr< FExtender > Extender
)

Public function

void

 

RestoreFromLayout

(
    const TSharedRef< FTabManager::FLay...
)

Applies the passed in layout (or the saved user-modified version if available).

Protected function Virtual

void

 

SaveAsset_Execute()

Called when "Save" is clicked for this asset

Protected function Virtual

void

 

SaveAssetAs_Execute()

Called when "Save As" is clicked for this asset

Public function

void

 

SetAssetEditorModeManager

(
    FAssetEditorModeManager* InMod...
)

Set the asset editor mode manager we are using

Public function

void

 

SetMenuOverlay

(
    TSharedRef< SWidget > Widget
)

Allows the caller to set a menu overlay, displayed to the far right of the editor's menu bar

Public function Static

void

 

SetPreviousWorldCentricToolkitHostForNewAssetEditor

(
    TSharedRef< IToolkitHost > ToolkitH...
)

Static: Used internally to set the world-centric toolkit host for a newly-created standalone asset editing toolkit

Protected function Virtual Const

bool

 

ShouldPromptForNewFilesOnReload

(
    const UObject& object
)

Called to determine if the user should be prompted for a new file if one is missing during an asset reload

Protected function Static

void

 

SwitchToStandaloneEditor_Execute

(
    TWeakPtr< FAssetEditorToolkit > Thi...
)

Static: Called when "Switch to Standalone Editor" is clicked for the asset editor

Protected function Static

void

 

SwitchToWorldCentricEditor_Execute

(
    TWeakPtr< FAssetEditorToolkit > Thi...
)

Static: Called when "Switch to World-Centric Editor" is clicked for the asset editor

Overridden from IAssetEditorInstance

Overridden from IToolkit

Name Description

Public function Const

FText

 

GetBaseToolkitName()

Returns the localized name of this toolkit type (typically just " editor")

Public function Virtual Const

FEdMode *...

 

GetEditorMode()

Public function Virtual Const

FText

 

GetEditorModeDisplayName()

Public function Virtual Const

FSlateIcon

 

GetEditorModeIcon()

Public function Virtual Const

const TArray...

 

GetObjectsCurrentlyBeingEdited()

For asset editor toolkits, returns the UObjects for the assets currently being edited

Public function Virtual Const

UEdMode *...

 

GetScriptableEditorMode()

Public function Virtual Const

FText

 

GetTabSuffix()

Returns the localized tab suffix

Public function Const

FName

 

GetToolkitFName()

Returns the invariant name of this toolkit type

Public function Virtual Const

FText

 

GetToolkitName()

Returns the localized name of this toolkit

Public function Virtual Const

FText

 

GetToolkitToolTipText()

Returns the localized tooltip text of this toolkit

Public function Const

FString

 

GetWorldCentricTabPrefix()

Returns the localize prefix string to use for tab labels in world-centric mode.

Public function Virtual Const

bool

 

IsAssetEditor()

Returns true if this toolkit is used to edit assets (even if it's not necessarily editing one right now.)

Public function Virtual

void

 

RegisterTabSpawners

(
    const TSharedRef< FTabManager >& T...
)

IToolkit interface

Public function Virtual

void

 

UnregisterTabSpawners

(
    const TSharedRef< FTabManager >& T...
)

Unregister tabs that this toolkit can spawn

Constants

Name

Description

PreviousWorldCentricToolkitHostForNewAssetEditor

Static: World centric toolkit host to use for the next created asset editing toolkit

SharedMenuExtensibilityManager

The extensibility managers shared by all asset types

SharedToolBarExtensibilityManager

ToolbarTabId

The tab ids for all the tabs used

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