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

FAssetEditorModeManager *

 

AssetEditorModeManager

The asset editor mode manager

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< TSharedPtr< FLayoutExtender > >

 

LayoutExtenders

Array of layout extenders

Protected variable

TWeakPtr< IToolkitHost >

 

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< FTabManager >

 

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

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

(
    FMenuBuilder& MenuBuilder
)

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

Public function

void

 

FillDefaultFileMenuCommands

(
    FMenuBuilder& MenuBuilder
)

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

Public function

void

 

FillDefaultHelpMenuCommands

(
    FMenuBuilder& MenuBuilder
)

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

FAssetEditorModeManager *

 

GetAssetEditorModeManager()

Get the asset editor mode manager we are using

Protected function Virtual Const

FLinearColor

 

GetDefaultTabColor()

Protected function Virtual Const

const FSlateBrush *

 

GetDefaultTabIcon()

Protected function Virtual Const

FString

 

GetDocumentationLink()

Protected function Const

UObject *

 

GetEditingObject()

Returns the single object currently being edited.

Protected function Const

const TArray< UObject * > &

 

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< IToolkitHost >

 

GetPreviousWorldCentricToolkitHost()

Protected function Virtual Const

void

 

GetSaveableObjects

(
    TArray< UObject* >& OutObjects
)

Get the collection of edited objects that can be saved.

Public function Static

TSharedPtr< FExtensibilityManager >

 

GetSharedMenuExtensibilityManager()

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

Public function Static

TSharedPtr< FExtensibilityManager >

 

GetSharedToolBarExtensibilityManager()

Public function

TSharedPtr< FTabManager >

 

GetTabManager()

Public function Const

FName

 

GetToolbarTabId()

Gets the toolbar tab id

Public function Const

FName

 

GetToolMenuAppName()

Public function Const

FName

 

GetToolMenuToolbarName()

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 >& InitToolkitHost,
    const FName AppIdentifier,
    const TSharedRef< FTabManager::FLayout >& StandaloneDefaultLayout,
    const bool bCreateDefaultStandaloneMenu,
    const bool bCreateDefaultToolbar,
    const TArray< UObject* >& ObjectsToEdit,
    const bool bInIsToolbarFocusable,
    const bool bInUseSmallToolbarIcons
)

Initializes this asset editor.

Public function Virtual

void

 

InitAssetEditor

(
    const EToolkitMode::Type Mode,
    const TSharedPtr< IToolkitHost >& InitToolkitHost,
    const FName AppIdentifier,
    const TSharedRef< FTabManager::FLayout >& StandaloneDefaultLayout,
    const bool bCreateDefaultStandaloneMenu,
    const bool bCreateDefaultToolbar,
    UObject* ObjectToEdit,
    const bool bInIsToolbarFocusable,
    const bool bInUseSmallToolbarIcons
)

Initializes this asset editor.

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 >& Toolkit
)

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 >& Toolkit
)

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

 

RegisterMenus()

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::FLayout >& NewLayout
)

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* InModeManager
)

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 > ToolkitHost
)

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 > ThisToolkitWeakRef
)

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

Protected function Static

void

 

SwitchToWorldCentricEditor_Execute

(
    TWeakPtr< FAssetEditorToolkit > ThisToolkitWeakRef
)

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

const TArray< UObject * > *

 

GetObjectsCurrentlyBeingEdited()

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

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 >& TabManager
)

IToolkit interface

Public function Virtual

void

 

UnregisterTabSpawners

(
    const TSharedRef< FTabManager >& TabManager
)

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

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback