Navigation
API > API/Editor > API/Editor/ContentBrowser
Inheritance Hierarchy
- UObject
- UContentBrowserAssetContextMenuContext
References
| Module | ContentBrowser |
| Header | /Engine/Source/Editor/ContentBrowser/Public/ContentBrowserMenuContexts.h |
| Include | #include "ContentBrowserMenuContexts.h" |
Syntax
UCLASS ()
class UContentBrowserAssetContextMenuContext : public UObject
Variables
| Type | Name | Description | |
|---|---|---|---|
| TWeakPtr< FAssetContextMenu > | AssetContextMenu | ||
| bool | bCanBeModified | ||
| bool | bCanView | ||
| bool | bContainsUnsupportedAssets | ||
| bool | bHasCookedPackages | ||
| TObjectPtr< const UAssetDefinition > | CommonAssetDefinition | ||
| TWeakPtr< IAssetTypeActions > | CommonAssetTypeActions | ||
| TObjectPtr< UClass > | CommonClass | ||
| TArray< FAssetData > | SelectedAssets | The currently selected assets in the content browser. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| const UContentBrowserAssetContextMenuContext * | FindContextWithAssets
(
const MenuOrSectionType& MenuOrSection |
Finds the Content Browser MenuContext from a Menu or Section, and returns the context provided there are some selected assets. | |
| int32 | GetNumAssetsSelected
(
const MenuOrSectionType& MenuOrSection |
||
| TArray< TSoftObjectPtr< ExpectedAssetType > > | GetSelectedAssetSoftObjects
(
EIncludeSubclasses IncludeSubclasses |
Get the selected assets as an array of SoftObjectPtr |
|
| TArray< FAssetData > | GetSelectedAssetsOfType
(
const UClass* AssetClass, |
Returns a filtered array of assets that are of the desired class and potentially any subclasses. | |
| const TArray< FContentBrowserItem > & | Read-only access to the list of currently selected items | ||
| TArray< UObject * > | |||
| TArray< ExpectedAssetType * > | |||
| const FAssetData * | GetSingleSelectedAssetOfType
(
const UClass* AssetClass, |
Sometimes you want to write actions that will only operate on a singular selected asset, in those cases you can use the following function which will only return a live ptr if it's an instance of that asset type, and only one thing is selected. | |
| ExpectedAssetType * | LoadFirstSelectedObject
(
const TSet< FName >& LoadTags |
Loads the first selected valid asset and returns it. | |
| TArray< UObject * > | LoadSelectedObjects
(
TSet< FName > LoadTags |
Loads all the selected assets and returns an array of the objects. | |
| TArray< ExpectedAssetType * > | LoadSelectedObjects
(
TSet< FName > LoadTags |
Loads all the selected assets and returns an array of the ExpectedAssetType. | |
| TArray< ExpectedAssetType * > | LoadSelectedObjectsIf
(
TFunctionRef< bool(const FAssetData&AssetData)> PredicateFilter |
Loads the selected assets if the PredicateFilter returns true, and returns an array of the objects. | |
| TArray< ExpectedAssetType * > | LoadSelectedObjectsIf
(
TSet< FName > LoadTags, |
Loads the selected assets if the PredicateFilter returns true, and returns an array of the objects. | |
| TArray< UObject * > | Loads the selected assets (if needed) which is based on AssetViewUtils::LoadAssetsIfNeeded, this exists primarily for backwards compatability. | ||
| ExpectedType * | LoadSingleSelectedAsset
(
const MenuOrSectionType& MenuOrSection |