Skip to content

USMContentAsset¶

Module: SMContentEditor

#include <SMContentAsset.h>

Inherits from UObject

Description¶

class USMContentAsset;

Import content to your project to use as examples or a base for your own implementation.

Public Functions¶

Name
virtual bool IsEditorOnly() const override
FString GetOwningDirectory() const
FString GetDirectoryPath(bool bRelative =false) const
FString GetStagedFilesPath(bool bRelative =false) const
FString GetPackFilePath(bool bRelative =false) const
TArray< FAssetData > GetStagedAssets() const
bool IsExtractedAndStaged() const
void SetInputMappingContext(const UInputMappingContext * InInputMappingContext)
void SetGameplayTags(TArray< FSMStoredGameplayTag > && GameplayTags)
const TArray< FSMStoredGameplayTag > & GetGameplayTags() const
const TMap< FName, FSMInputActionWrapper > & GetInputActionsMapping() const
const TArray< FString > & GetPackagedFiles() const
void PackageAsset()
FString GetStagedFilesDirectoryName()

Public Attributes¶

Name
FText Name
FText Author
FText Description
FText DetailedDescription
TObjectPtr< UTexture2D > TitleImage
TObjectPtr< UTexture2D > DescriptionImage
ESMContentType ContentType
int32 SortPriority
FString PrimaryMapName
TArray< TSoftObjectPtr< USMContentAsset > > ContentAssetDependencies
bool bInstallToPluginContent
bool bAutoPopulateGameplayTags

Public Functions Documentation¶

function IsEditorOnly¶

inline virtual bool IsEditorOnly() const override

function GetOwningDirectory¶

FString GetOwningDirectory() const

The relative directory owning this file.


function GetDirectoryPath¶

FString GetDirectoryPath(
    bool bRelative =false
) const

The full directory path to this asset.


function GetStagedFilesPath¶

FString GetStagedFilesPath(
    bool bRelative =false
) const

The full path to the staged files before installation.


function GetPackFilePath¶

FString GetPackFilePath(
    bool bRelative =false
) const

Return the expected pak file path location


function GetStagedAssets¶

TArray< FAssetData > GetStagedAssets() const

Retrieve the actual UAssets for this content; Only valid if staged. These are assets either extracted and ready to be migrated or are assets ready to be packaged into a pak file.


function IsExtractedAndStaged¶

bool IsExtractedAndStaged() const

Checks if this asset is extracted to the plugin content folder and staged, potentially ready for migration.


function SetInputMappingContext¶

void SetInputMappingContext(
    const UInputMappingContext * InInputMappingContext
)

Set the input mapping context for the asset This will duplicate the input context.


function SetGameplayTags¶

void SetGameplayTags(
    TArray< FSMStoredGameplayTag > && GameplayTags
)

Store gameplay tags.


function GetGameplayTags¶

inline const TArray< FSMStoredGameplayTag > & GetGameplayTags() const

Retrieve stored gameplay tags.


function GetInputActionsMapping¶

inline const TMap< FName, FSMInputActionWrapper > & GetInputActionsMapping() const

Return the input action context embedded into the content asset.


function GetPackagedFiles¶

inline const TArray< FString > & GetPackagedFiles() const

Return the files packaged with this asset.


function PackageAsset¶

void PackageAsset()

function GetStagedFilesDirectoryName¶

static FString GetStagedFilesDirectoryName()

The single contained directory files should be staged to prior to install. Not a full path.


Public Attributes Documentation¶

variable Name¶

FText Name;

variable Author¶

FText Author;

variable Description¶

FText Description;

variable DetailedDescription¶

FText DetailedDescription;

variable TitleImage¶

TObjectPtr< UTexture2D > TitleImage;

The small title image.


variable DescriptionImage¶

TObjectPtr< UTexture2D > DescriptionImage;

The large image to display when selected.


variable ContentType¶

ESMContentType ContentType;

The type of content this asset represents.


variable SortPriority¶

int32 SortPriority = 10;

The order to display by default during Content selection.


variable PrimaryMapName¶

FString PrimaryMapName;

The name of the map which should be opened when the Content is installed.


variable ContentAssetDependencies¶

TArray< TSoftObjectPtr< USMContentAsset > > ContentAssetDependencies;

Other content assets this one is dependent on.


variable bInstallToPluginContent¶

bool bInstallToPluginContent = false;

The content should be installed to the plugin content folder only.


variable bAutoPopulateGameplayTags¶

bool bAutoPopulateGameplayTags = false;

If we're allowed to populate gameplay tags.


Private Attributes Documentation¶

variable StoredGameplayTags¶

TArray< FSMStoredGameplayTag > StoredGameplayTags;

Gameplay tags detected during packaging.


variable InputActionsMapping¶

TMap< FName, FSMInputActionWrapper > InputActionsMapping;

Input values detected during packaging.


variable PackagedFiles¶

TArray< FString > PackagedFiles;

Read only view of all packaged files.