Navigation
API > API/Editor > API/Editor/UnrealEd > API/Editor/UnrealEd/Subsystems
Inheritance Hierarchy
- UDynamicSubsystem
- UEditorSubsystem
- UAssetEditorSubsystem
References
| Module | UnrealEd |
| Header | /Engine/Source/Editor/UnrealEd/Public/Subsystems/AssetEditorSubsystem.h |
| Include | #include "Subsystems/AssetEditorSubsystem.h" |
Syntax
UCLASS (MinimalAPI)
class UAssetEditorSubsystem : public UEditorSubsystem
Remarks
Constructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddReadOnlyAssetFilter
(
const FName& Owner, |
||
| bool | CanOpenEditorForAsset
(
UObject* Asset, |
Check whether the given asset can be opened in the given open method | |
| bool | Close all open asset editors | ||
| int32 | CloseAllEditorsForAsset
(
UObject* Asset |
Close all active editors for the supplied asset and return the number of asset editors that were closed | |
| void | CloseOtherEditors
(
UObject* Asset, |
Close any editor which is not this one | |
| 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. | |
| void | CreateRecentAssetsMenuForEditor
(
const IAssetEditorInstance* InAssetEditorInstance, |
Fill in the given section with the recent assets for the given asset editor instance | |
| void | Deinitialize () |
||
| IAssetEditorInstance * | FindEditorForAsset
(
UObject* Asset, |
Returns the primary editor if one is already open for the specified asset. | |
| bool | FindEditorModeInfo
(
const FEditorModeID& InModeID, |
Returns information about an editor mode, based on the given ID. | |
| TArray< IAssetEditorInstance * > | FindEditorsForAsset
(
UObject* Asset |
Returns all editors currently opened for the specified asset | |
| TArray< IAssetEditorInstance * > | FindEditorsForAssetAndSubObjects
(
UObject* Asset |
Returns all editors currently opened for the specified asset or any of its subobjects | |
| TArray< UObject * > | Get all assets currently being tracked with open editors | ||
| FNamePermissionList & | Get the permission list that controls which editor modes are exposed | ||
| 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. | |
| TOptional< EAssetOpenMethod > | GetAssetsBeingOpenedMethod
(
TArray< TObjectPtr< UObject > > Assets |
||
| TOptional< bool > | Get the current value of bAutoRestoreAndDisableSaving | ||
| TArray< FEditorModeInfo > | Creates an array of all known FEditorModeInfos, sorted by their priority, from greatest to least. | ||
| FMainMRUFavoritesList * | |||
| void | Initialize
(
FSubsystemCollectionBase& Collection |
||
| bool | IsAssetEditable
(
const UObject* Asset |
||
| void | NotifyAssetClosed
(
UObject* Asset, |
Notify the asset editor manager that an asset editor is done editing an asset | |
| void | NotifyAssetOpened
(
UObject* Asset, |
Notify the asset editor manager that an asset was opened | |
| void | NotifyAssetsOpened
(
const TArray< UObject* >& Assets, |
||
| void | NotifyEditorClosed
(
IAssetEditorInstance* Instance |
Notify the asset editor manager that an asset was closed | |
| void | NotifyEditorOpeningPreWidgets
(
const TArray< UObject* >& Assets, |
Notify the asset editor manager that an asset editor is being opened and before widgets are constructed | |
| FOnAssetClosedInEditorEvent & | |||
| FAssetEditorOpenEvent & | |||
| FAssetEditorRequestCloseEvent & | |||
| FAssetEditorRequestOpenEvent & | |||
| FOnAssetOpenedInEditorEvent & | |||
| FOnModeRegistered & | Event that is triggered whenever a mode is registered | ||
| FRegisteredModesChangedEvent & | Event that is triggered whenever a mode is registered or unregistered | ||
| FOnModeUnregistered & | Event that is triggered whenever a mode is unregistered | ||
| FOnAssetsOpenedInEditorEvent & | |||
| bool | OpenEditorForAsset
(
TObjectPtr< ObjectType > Asset, |
||
| bool | OpenEditorForAsset
(
UObject* Asset, |
Tries to open an editor for the specified asset. | |
| void | OpenEditorForAsset
(
const FString& AssetPathName, |
Opens an asset by path | |
| void | OpenEditorForAsset
(
const FSoftObjectPath& AssetPath, |
||
| bool | OpenEditorForAssets
(
const TArray< UObject* >& Assets, |
Tries to open an editor for all of the specified assets. | |
| bool | OpenEditorForAssets_Advanced
(
const TArray< UObject* >& InAssets, |
||
| void | OpenEditorsForAssets
(
const TArray< FName >& AssetsToOpen, |
||
| void | OpenEditorsForAssets
(
const TArray< FString >& AssetsToOpen, |
Opens editors for the supplied assets (via OpenEditorForAsset) | |
| void | OpenEditorsForAssets
(
const TArray< FSoftObjectPath >& AssetsToOpen |
||
| void | RegisterUAssetEditor
(
UAssetEditor* NewAssetEditor |
||
| void | RemoveAssetFromAllEditors
(
UObject* Asset |
Remove given asset from all open editors | |
| void | RemoveReadOnlyAssetFilter
(
const FName& Owner |
||
| void | Request notification to restore the assets that were previously open when the editor was last closed | ||
| void | Restore the assets that were previously open when the editor was last closed. | ||
| void | SaveOpenAssetEditors
(
const bool bOnShutdown |
Saves a list of open asset editors so they can be restored on editor restart. | |
| void | SaveOpenAssetEditors
(
const bool bOnShutdown, |
Saves a list of open asset editors so they can be restored on editor restart. | |
| void | SetAutoRestoreAndDisableSaving
(
const bool bInAutoRestoreAndDisableSaving |
Sets bAutoRestoreAndDisableSaving and sets bRequestRestorePreviouslyOpenAssets to false to avoid running RestorePreviouslyOpenAssets() twice. | |
| void | SetAutoRestoreAndDisableSavingOverride
(
TOptional< bool > bInAutoRestoreAndDisableSaving |
Set/Unset the bAutoRestoreAndDisableSaving override, along with setting bRequestRestorePreviouslyOpenAssets to false to avoid running RestorePreviouslyOpenAssets() twice | |
| void | SetRecentAssetsFilter
(
const FMainMRUFavoritesList::FDoesMRUFavoritesItemPassFilter& InFilter |
||
| void | UnregisterUAssetEditor
(
UAssetEditor* RemovedAssetEditor |
Classes
| Type | Name | Description | |
|---|---|---|---|
| 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 |
Typedefs
| Name | Description |
|---|---|
| FReadOnlyAssetFilter | 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) |