G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
UAssetManager Class Reference

A singleton UObject that is responsible for loading and unloading PrimaryAssets, and maintaining game-specific asset references Games should override this class and change the class reference. More...

Public Member Functions

Functions
FPrimaryAssetId GetPrimaryAssetIdForObject (UObject Object)
 Sees if the passed in object is a registered primary asset, if so return it. Returns invalid Identifier if not found.
FSoftObjectPath GetPrimaryAssetPath (FPrimaryAssetId PrimaryAssetId) const
FPrimaryAssetId GetPrimaryAssetIdForData (FAssetData AssetData) const
int UnloadPrimaryAsset (FPrimaryAssetId AssetToUnload)
int UnloadPrimaryAssets (TArray< FPrimaryAssetId > AssetsToUnload)
void LoadPrimaryAsset (FPrimaryAssetId AssetToLoad, TArray< FName > LoadBundles, int Priority=0, UObject OptionalCallbackObject=nullptr, FName OptionalFinishedCallbackFunctionName=NAME_None, FName OptionalCanceledCallbackName=NAME_None)
void LoadPrimaryAssets (TArray< FPrimaryAssetId > AssetsToLoad, TArray< FName > LoadBundles, int Priority=0, UObject OptionalCallbackObject=nullptr, FName OptionalFinishedCallbackFunctionName=NAME_None, FName OptionalCanceledCallbackName=NAME_None)
bool GetPrimaryAssetData (FPrimaryAssetId PrimaryAssetId, FAssetData &AssetData)
 Gets the FAssetData for a primary asset with the specified type/name, will only work for once that have been scanned for already. Returns true if it found a valid data.
bool GetPrimaryAssetDataList (FPrimaryAssetType PrimaryAssetType, TArray< FAssetData > &AssetDataList)
 Gets list of all FAssetData for a primary asset type, returns true if any were found.
FPrimaryAssetId GetPrimaryAssetIdForPath (FSoftObjectPath ObjectPath) const
bool GetPrimaryAssetIdList (FPrimaryAssetType PrimaryAssetType, TArray< FPrimaryAssetId > &PrimaryAssetIdList)
 Gets list of all FPrimaryAssetId for a primary asset type, returns true if any were found.
UObject GetPrimaryAssetObject (FPrimaryAssetId PrimaryAssetId)
 Gets the in-memory UObject for a primary asset id, returning nullptr if it's not in memory. Will return blueprint class for blueprint assets. This works even if the asset wasn't loaded explicitly.
FPrimaryAssetRules GetPrimaryAssetRules (FPrimaryAssetId PrimaryAssetId)
 Gets the management rules for a specific asset, this will merge the type and individual values.
bool GetPrimaryAssetTypeInfo (FPrimaryAssetType PrimaryAssetType, FPrimaryAssetTypeInfo &AssetTypeInfo)
 Gets metadata for a specific asset type, returns false if not found.
void GetPrimaryAssetTypeInfoList (TArray< FPrimaryAssetTypeInfo > &AssetTypeInfoList)
 Gets list of all primary asset types infos.
Public Member Functions inherited from UObject
bool MarkPackageDirty () const
void RemoveFromRoot ()
bool GetIsRooted () const
bool IsTransient () const
bool Modify (bool bAlwaysMarkDirty=true)
void SetTransactional (bool bTransactional)
bool IsSupportedForNetworking () const
UClass GetClass () const
UObject GetOuter () const
UObject GetTypedOuter (TSubclassOf< UObject > Target) const
 Traverses the outer chain searching for the next object of a certain type.
UPackage GetOutermost () const
UPackage GetPackage () const
void AddToRoot ()
UWorld GetWorld () const
FName GetName () const
FString GetFullName (const UObject StopOuter=nullptr) const
FString GetPathName (const UObject StopOuter=nullptr) const
bool IsA (const UClass Class) const
 Returns true if this object is of the specified type, or a child of that type.
void SaveConfig ()
void LoadConfig ()
void ReloadConfig ()
void CopyScriptPropertiesFrom (const UObject OtherObject)
void opCast (?&Address) const
FString ToString () const

Static Public Member Functions

Static Functions
static UAssetManager Get ()
static UClass StaticClass ()
static bool IsInitialized ()
Static Public Member Functions inherited from UObject
static UClass StaticClass ()

Additional Inherited Members

Public Attributes inherited from UObject
const UClass Class
const UObject Outer
const UPackage Outermost
const UPackage Package
const UWorld World
const FName Name
const bool IsRooted

Detailed Description

A singleton UObject that is responsible for loading and unloading PrimaryAssets, and maintaining game-specific asset references Games should override this class and change the class reference.

Member Function Documentation

◆ Get()

UAssetManager Get ( )
static

◆ GetPrimaryAssetData()

bool GetPrimaryAssetData ( FPrimaryAssetId PrimaryAssetId,
FAssetData & AssetData )

Gets the FAssetData for a primary asset with the specified type/name, will only work for once that have been scanned for already. Returns true if it found a valid data.

◆ GetPrimaryAssetDataList()

bool GetPrimaryAssetDataList ( FPrimaryAssetType PrimaryAssetType,
TArray< FAssetData > & AssetDataList )

Gets list of all FAssetData for a primary asset type, returns true if any were found.

◆ GetPrimaryAssetIdForData()

FPrimaryAssetId GetPrimaryAssetIdForData ( FAssetData AssetData) const

◆ GetPrimaryAssetIdForObject()

FPrimaryAssetId GetPrimaryAssetIdForObject ( UObject Object)

Sees if the passed in object is a registered primary asset, if so return it. Returns invalid Identifier if not found.

◆ GetPrimaryAssetIdForPath()

FPrimaryAssetId GetPrimaryAssetIdForPath ( FSoftObjectPath ObjectPath) const

◆ GetPrimaryAssetIdList()

bool GetPrimaryAssetIdList ( FPrimaryAssetType PrimaryAssetType,
TArray< FPrimaryAssetId > & PrimaryAssetIdList )

Gets list of all FPrimaryAssetId for a primary asset type, returns true if any were found.

◆ GetPrimaryAssetObject()

UObject GetPrimaryAssetObject ( FPrimaryAssetId PrimaryAssetId)

Gets the in-memory UObject for a primary asset id, returning nullptr if it's not in memory. Will return blueprint class for blueprint assets. This works even if the asset wasn't loaded explicitly.

◆ GetPrimaryAssetPath()

FSoftObjectPath GetPrimaryAssetPath ( FPrimaryAssetId PrimaryAssetId) const

◆ GetPrimaryAssetRules()

FPrimaryAssetRules GetPrimaryAssetRules ( FPrimaryAssetId PrimaryAssetId)

Gets the management rules for a specific asset, this will merge the type and individual values.

◆ GetPrimaryAssetTypeInfo()

bool GetPrimaryAssetTypeInfo ( FPrimaryAssetType PrimaryAssetType,
FPrimaryAssetTypeInfo & AssetTypeInfo )

Gets metadata for a specific asset type, returns false if not found.

◆ GetPrimaryAssetTypeInfoList()

void GetPrimaryAssetTypeInfoList ( TArray< FPrimaryAssetTypeInfo > & AssetTypeInfoList)

Gets list of all primary asset types infos.

◆ IsInitialized()

bool IsInitialized ( )
static

◆ LoadPrimaryAsset()

void LoadPrimaryAsset ( FPrimaryAssetId AssetToLoad,
TArray< FName > LoadBundles,
int Priority = 0,
UObject OptionalCallbackObject = nullptr,
FName OptionalFinishedCallbackFunctionName = NAME_None,
FName OptionalCanceledCallbackName = NAME_None )

◆ LoadPrimaryAssets()

void LoadPrimaryAssets ( TArray< FPrimaryAssetId > AssetsToLoad,
TArray< FName > LoadBundles,
int Priority = 0,
UObject OptionalCallbackObject = nullptr,
FName OptionalFinishedCallbackFunctionName = NAME_None,
FName OptionalCanceledCallbackName = NAME_None )

◆ StaticClass()

UClass StaticClass ( )
static

◆ UnloadPrimaryAsset()

int UnloadPrimaryAsset ( FPrimaryAssetId AssetToUnload)

◆ UnloadPrimaryAssets()

int UnloadPrimaryAssets ( TArray< FPrimaryAssetId > AssetsToUnload)