Navigation
API > API/Editor > API/Editor/UnrealEd
| Name | UAssetEditorSubsystem |
| Type | class |
| Header File | /Engine/Source/Editor/UnrealEd/Public/Subsystems/AssetEditorSubsystem.h |
| Include Path | #include "Subsystems/AssetEditorSubsystem.h" |
Syntax
UCLASS (MinimalAPI)
class UAssetEditorSubsystem : public UEditorSubsystem
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → USubsystem → UDynamicSubsystem → UEditorSubsystem → UAssetEditorSubsystem
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UAssetEditorSubsystem() |
Subsystems/AssetEditorSubsystem.h |
Classes
| Name | Remarks |
|---|---|
| FAssetEditorOpenEvent | Called when an asset editor is actually opened |
| FAssetEditorRequestCloseEvent | Event called specifically when an external system requests an asset editor to be closed (e.g by calling CloseAllAssetEditors()) If you want an event that is called anytime an asset is removed from an editor (which may or may not close the editor) - use OnAssetClosedInEditor() |
| FAssetEditorRequestOpenEvent | Called when an asset editor is requested to be opened |
| FOnAssetClosedInEditorEvent | Called when an editor is done editing an asset |
| FOnAssetOpenedInEditorEvent | Called when an asset has been opened in an editor |
| FOnAssetsOpenedInEditorEvent | Called when an asset editor is opening and before widgets are constructed |
Structs
| Name | Remarks |
|---|---|
| FAssetEditorAnalyticInfo | Struct used to track total time and # of invocations during an overall UnrealEd session |
| FAssetEntry | Utility struct for assets book keeping. |
| FOpenedEditorTime | Struct used by OpenedEditorTimes map to store editor names and times |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FReadOnlyAssetFilter | TBaseDelegate_OneParam< bool, const FString & > | Functionality to add a filter that is run to check if an asset is allowed to be opened in read only mode (If the asset type supports it) | Subsystems/AssetEditorSubsystem.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AllowedEditorModes | FNamePermissionList | Which FEditorModeInfo data should be returned when queried, filtered by the mode's ID. | Subsystems/AssetEditorSubsystem.h | |
| AssetClosedInEditorEvent | FOnAssetClosedInEditorEvent | Called when an editor is done editing an asset | Subsystems/AssetEditorSubsystem.h | |
| AssetEditorOpenedEvent | FAssetEditorOpenEvent | Multicast delegate executed when an asset editor is actually opened | Subsystems/AssetEditorSubsystem.h | |
| AssetEditorRequestCloseEvent | FAssetEditorRequestCloseEvent | Call to request closing editors for an asset | Subsystems/AssetEditorSubsystem.h | |
| AssetEditorRequestOpenEvent | FAssetEditorRequestOpenEvent | Multicast delegate executed when an asset editor is requested to be opened | Subsystems/AssetEditorSubsystem.h | |
| AssetOpenedInEditorEvent | FOnAssetOpenedInEditorEvent | Called when an asset has been opened in an editor | Subsystems/AssetEditorSubsystem.h | |
| AssetOpenMethodCache | TMap< FString, EAssetOpenMethod > | The method any assets being opened are requested to open in, only valid during the open process (OpenEditorForAsset) Since there is no way to generically get this information to FAssetEditorToolkit::InitAssetEditor | Subsystems/AssetEditorSubsystem.h | |
| bAutoRestoreAndDisableSaving | TOptional< bool > | Flag whether to disable SaveOpenAssetEditors() and enable auto-restore on RestorePreviouslyOpenAssets(). | Subsystems/AssetEditorSubsystem.h | |
| bRememberMyChoiceChecked | bool | True if the "Remember my choice" checkbox on the restore assets notification is checked | Subsystems/AssetEditorSubsystem.h | |
| bRequestRestorePreviouslyOpenAssets | bool | Flag whether there has been a request to notify whether to restore previously open assets | Subsystems/AssetEditorSubsystem.h | |
| bSavingOnShutdown | bool | Flag whether we are currently shutting down | Subsystems/AssetEditorSubsystem.h | |
| EditorModes | RegisteredModeInfoMap | Map of FEditorModeId to EditorModeInfo for all known UEdModes when the subsystem initialized | Subsystems/AssetEditorSubsystem.h | |
| EditorOpeningPreWidgetsEvent | FOnAssetsOpenedInEditorEvent | Called when editor is opening and before widgets are constructed | Subsystems/AssetEditorSubsystem.h | |
| EditorUsageAnalytics | TMap< FName, FAssetEditorAnalyticInfo > | Holds the cumulative time editors have been open by type. | Subsystems/AssetEditorSubsystem.h | |
| MaxRecentAssetsToShowInMenu | int32 | The max number of recent assets to show in the menu | Subsystems/AssetEditorSubsystem.h | |
| OnEditorModeRegisteredEvent | FOnModeRegistered | Event that is triggered whenever a mode is registered. Includes the mode's ID. | Subsystems/AssetEditorSubsystem.h | |
| OnEditorModesChangedEvent | FRegisteredModesChangedEvent | Event that is triggered whenever a mode is registered or unregistered. | Subsystems/AssetEditorSubsystem.h | |
| OnEditorModeUnregisteredEvent | FOnModeUnregistered | Event that is triggered whenever a mode is unregistered. Includes the mode's ID. | Subsystems/AssetEditorSubsystem.h | |
| OpenedAssets | TMultiMap< FAssetEntry, IAssetEditorInstance * > | Holds the opened assets. | Subsystems/AssetEditorSubsystem.h | |
| OpenedEditors | TMultiMap< IAssetEditorInstance *, FAssetEntry > | Holds the opened editors. | Subsystems/AssetEditorSubsystem.h | |
| OpenedEditorTimes | TMap< IAssetEditorInstance *, FOpenedEditorTime > | Holds the times that editors were opened. | Subsystems/AssetEditorSubsystem.h | |
| OwnedAssetEditors | TArray< TObjectPtr< UAssetEditor > > | Subsystems/AssetEditorSubsystem.h |
|
|
| ReadOnlyAssetFilters | TMap< FName, FReadOnlyAssetFilter > | External filters that are run to check if an asset is openable in read only mode | Subsystems/AssetEditorSubsystem.h | |
| RecentAssetsFilter | FMainMRUFavoritesList::FDoesMRUFavoritesItemPassFilter | The filter run through any assets before they are shown in the recents menu or restore prompt | Subsystems/AssetEditorSubsystem.h | |
| RecentAssetsList | TUniquePtr< FMainMRUFavoritesList > | MRU list of recently opened assets | Subsystems/AssetEditorSubsystem.h | |
| RecentAssetToAssetEditorMap | TMap< FString, FString > | Map keeping track of the asset editor each recent asset was opened in | Subsystems/AssetEditorSubsystem.h | |
| RestorePreviouslyOpenAssetsNotificationPtr | TWeakPtr< SNotificationItem > | A pointer to the notification used by RestorePreviouslyOpenAssets | Subsystems/AssetEditorSubsystem.h | |
| TickDelegate | FTickerDelegate | Holds a delegate to be invoked when the widget ticks. | Subsystems/AssetEditorSubsystem.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddReadOnlyAssetFilter
(
const FName& Owner, |
Subsystems/AssetEditorSubsystem.h | ||
| Check whether the given asset can be opened in the given open method | Subsystems/AssetEditorSubsystem.h | ||
bool CloseAllAssetEditors() |
Close all open asset editors | Subsystems/AssetEditorSubsystem.h | |
int32 CloseAllEditorsForAsset
(
UObject* Asset |
Close all active editors for the supplied asset and return the number of asset editors that were closed | Subsystems/AssetEditorSubsystem.h |
|
void CloseOtherEditors
(
UObject* Asset, |
Close any editor which is not this one | Subsystems/AssetEditorSubsystem.h | |
UEdMode * CreateEditorModeWithToolsOwner
(
FEditorModeID ModeID, |
Creates a scriptable editor mode based on ID name, which will be owned by the given Owner, if that name exists in the map of editor modes found at system startup. | Subsystems/AssetEditorSubsystem.h | |
void CreateRecentAssetsMenuForEditor
(
const IAssetEditorInstance* InAssetEditorInstance, |
Fill in the given section with the recent assets for the given asset editor instance | Subsystems/AssetEditorSubsystem.h | |
virtual void Deinitialize() |
Subsystems/AssetEditorSubsystem.h | ||
IAssetEditorInstance * FindEditorForAsset
(
UObject* Asset, |
Returns the primary editor if one is already open for the specified asset. | Subsystems/AssetEditorSubsystem.h | |
bool FindEditorModeInfo
(
const FEditorModeID& InModeID, |
Returns information about an editor mode, based on the given ID. | Subsystems/AssetEditorSubsystem.h | |
TArray< IAssetEditorInstance * > FindEditorsForAsset
(
UObject* Asset |
Returns all editors currently opened for the specified asset | Subsystems/AssetEditorSubsystem.h | |
TArray< IAssetEditorInstance * > FindEditorsForAssetAndSubObjects
(
UObject* Asset |
Returns all editors currently opened for the specified asset or any of its subobjects | Subsystems/AssetEditorSubsystem.h | |
| Get all assets currently being tracked with open editors | Subsystems/AssetEditorSubsystem.h | ||
TArray< IAssetEditorInstance * > GetAllOpenEditors() |
Returns all editors that are currently alive | Subsystems/AssetEditorSubsystem.h | |
FNamePermissionList & GetAllowedEditorModes() |
Get the permission list that controls which editor modes are exposed | Subsystems/AssetEditorSubsystem.h | |
TOptional< EAssetOpenMethod > GetAssetBeingOpenedMethod
(
TObjectPtr< UObject > Asset |
These functions are used by the Asset Editor Toolkit to query the method in which the given assets are being opened These are only valid when the asset is in the process of being opened, i.e while we are in OpenEditorForAsset. | Subsystems/AssetEditorSubsystem.h | |
TOptional< EAssetOpenMethod > GetAssetsBeingOpenedMethod
(
TArray< TObjectPtr< UObject > > Assets |
Subsystems/AssetEditorSubsystem.h | ||
TOptional< bool > GetAutoRestoreAndDisableSavingOverride() |
Get the current value of bAutoRestoreAndDisableSaving | Subsystems/AssetEditorSubsystem.h | |
TArray< FEditorModeInfo > GetEditorModeInfoOrderedByPriority() |
Creates an array of all known FEditorModeInfos, sorted by their priority, from greatest to least. | Subsystems/AssetEditorSubsystem.h | |
FMainMRUFavoritesList * GetRecentlyOpenedAssets() |
Subsystems/AssetEditorSubsystem.h | ||
virtual void Initialize
(
FSubsystemCollectionBase& Collection |
Subsystems/AssetEditorSubsystem.h | ||
bool IsAssetEditable
(
const UObject* Asset |
Subsystems/AssetEditorSubsystem.h | ||
void NotifyAssetClosed
(
UObject* Asset, |
Notify the asset editor manager that an asset editor is done editing an asset | Subsystems/AssetEditorSubsystem.h | |
void NotifyAssetOpened
(
UObject* Asset, |
Notify the asset editor manager that an asset was opened | Subsystems/AssetEditorSubsystem.h | |
void NotifyAssetsOpened
(
const TArray< UObject* >& Assets, |
Subsystems/AssetEditorSubsystem.h | ||
void NotifyEditorClosed
(
IAssetEditorInstance* Instance |
Notify the asset editor manager that an asset was closed | Subsystems/AssetEditorSubsystem.h | |
void NotifyEditorOpeningPreWidgets
(
const TArray< UObject* >& Assets, |
Notify the asset editor manager that an asset editor is being opened and before widgets are constructed | Subsystems/AssetEditorSubsystem.h | |
virtual FOnAssetClosedInEditorEvent & OnAssetClosedInEditor() |
Subsystems/AssetEditorSubsystem.h | ||
FAssetEditorOpenEvent & OnAssetEditorOpened() |
Subsystems/AssetEditorSubsystem.h | ||
virtual FAssetEditorRequestCloseEvent & OnAssetEditorRequestClose() |
Subsystems/AssetEditorSubsystem.h | ||
virtual FAssetEditorRequestOpenEvent & OnAssetEditorRequestedOpen() |
Subsystems/AssetEditorSubsystem.h | ||
virtual FOnAssetOpenedInEditorEvent & OnAssetOpenedInEditor() |
Subsystems/AssetEditorSubsystem.h | ||
FOnModeRegistered & OnEditorModeRegistered() |
Event that is triggered whenever a mode is registered | Subsystems/AssetEditorSubsystem.h | |
FRegisteredModesChangedEvent & OnEditorModesChanged() |
Event that is triggered whenever a mode is registered or unregistered | Subsystems/AssetEditorSubsystem.h | |
FOnModeUnregistered & OnEditorModeUnregistered() |
Event that is triggered whenever a mode is unregistered | Subsystems/AssetEditorSubsystem.h | |
virtual FOnAssetsOpenedInEditorEvent & OnEditorOpeningPreWidgets() |
Subsystems/AssetEditorSubsystem.h | ||
bool OpenEditorForAsset
(
TObjectPtr< ObjectType > Asset, |
Subsystems/AssetEditorSubsystem.h | ||
bool OpenEditorForAsset
(
UObject* Asset, |
Tries to open an editor for the specified asset. | Subsystems/AssetEditorSubsystem.h | |
void OpenEditorForAsset
(
const FString& AssetPathName, |
Opens an asset by path | Subsystems/AssetEditorSubsystem.h | |
void OpenEditorForAsset
(
const FSoftObjectPath& AssetPath, |
Subsystems/AssetEditorSubsystem.h | ||
bool OpenEditorForAssets
(
const TArray< UObject* >& Assets, |
Tries to open an editor for all of the specified assets. | Subsystems/AssetEditorSubsystem.h |
|
bool OpenEditorForAssets_Advanced
(
const TArray< UObject* >& InAssets, |
Subsystems/AssetEditorSubsystem.h |
|
|
void OpenEditorsForAssets
(
const TArray< FName >& AssetsToOpen, |
Subsystems/AssetEditorSubsystem.h | ||
void OpenEditorsForAssets
(
const TArray< FString >& AssetsToOpen, |
Opens editors for the supplied assets (via OpenEditorForAsset) | Subsystems/AssetEditorSubsystem.h | |
void OpenEditorsForAssets
(
const TArray< FSoftObjectPath >& AssetsToOpen |
Subsystems/AssetEditorSubsystem.h | ||
void RegisterUAssetEditor
(
UAssetEditor* NewAssetEditor |
Subsystems/AssetEditorSubsystem.h | ||
void RemoveAssetFromAllEditors
(
UObject* Asset |
Remove given asset from all open editors | Subsystems/AssetEditorSubsystem.h | |
void RemoveReadOnlyAssetFilter
(
const FName& Owner |
Subsystems/AssetEditorSubsystem.h | ||
void RequestRestorePreviouslyOpenAssets() |
Request notification to restore the assets that were previously open when the editor was last closed | Subsystems/AssetEditorSubsystem.h | |
void RestorePreviouslyOpenAssets() |
Restore the assets that were previously open when the editor was last closed. | Subsystems/AssetEditorSubsystem.h | |
void SaveOpenAssetEditors
(
const bool bOnShutdown |
Saves a list of open asset editors so they can be restored on editor restart. | Subsystems/AssetEditorSubsystem.h | |
void SaveOpenAssetEditors
(
const bool bOnShutdown, |
Saves a list of open asset editors so they can be restored on editor restart. | Subsystems/AssetEditorSubsystem.h | |
void SetAutoRestoreAndDisableSaving
(
const bool bInAutoRestoreAndDisableSaving |
Sets bAutoRestoreAndDisableSaving and sets bRequestRestorePreviouslyOpenAssets to false to avoid running RestorePreviouslyOpenAssets() twice. | Subsystems/AssetEditorSubsystem.h | |
void SetAutoRestoreAndDisableSavingOverride
(
TOptional< bool > bInAutoRestoreAndDisableSaving |
Set/Unset the bAutoRestoreAndDisableSaving override, along with setting bRequestRestorePreviouslyOpenAssets to false to avoid running RestorePreviouslyOpenAssets() twice | Subsystems/AssetEditorSubsystem.h | |
void SetRecentAssetsFilter
(
const FMainMRUFavoritesList::FDoesMRUFavoritesItemPassFilter& InFilter |
Subsystems/AssetEditorSubsystem.h | ||
void UnregisterUAssetEditor
(
UAssetEditor* RemovedAssetEditor |
Subsystems/AssetEditorSubsystem.h |