Navigation
API > API/Plugins > API/Plugins/USDClasses > API/Plugins/USDClasses/UUsdAssetCache3
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
T * GetOrCreateCachedAsset
(
const FString& Hash, |
Templated version of GetOrCreateCachedAsset for convenience | USDAssetCache3.h | |
| Returns the cached UObject of the provided Class for the provided Hash if one exists. | USDAssetCache3.h |
|
GetOrCreateCachedAsset(const FString &, FString, EObjectFlags, bool , const UObject )
Description
Templated version of GetOrCreateCachedAsset for convenience
WARNING: As this may try loading a package from disk or call NewObject, this can only be called from the game thread!
| Name | GetOrCreateCachedAsset |
| Type | function |
| Header File | /Engine/Plugins/Runtime/USDCore/Source/USDClasses/Public/USDAssetCache3.h |
| Include Path | #include "USDAssetCache3.h" |
template<typename T>
T * GetOrCreateCachedAsset
(
const FString & Hash,
FString DesiredName,
EObjectFlags DesiredFlags,
bool * bOutCreatedAsset,
const UObject * Referencer
)
The asset that was returned or created
Parameters
| Name | Remarks |
|---|---|
| Hash | The string key to check with |
| DesiredName | The name we want the created object to have (the actual name may have additional suffixes) |
| DesiredFlags | The flags we want the created object to have (the actual applied flags may differ depending on context) |
| bOutCreatedAsset | Set to true if we created the asset that was return, but false if we returned an existing asset |
| Referencer | The asset will not be deleted or untracked until this referencer is removed (via any of the RemoveAssetReferencer member functions) |
GetOrCreateCachedAsset(const FString &, UClass , const FString &, int32, bool &, const UObject )
Description
Returns the cached UObject of the provided Class for the provided Hash if one exists. Otherwise, finds a new package for it on the cache's AssetDirectory and creates the asset via a NewObject
WARNING: As this may try loading a package from disk or call NewObject, this can only be called from the game thread!
| Name | GetOrCreateCachedAsset |
| Type | function |
| Header File | /Engine/Plugins/Runtime/USDCore/Source/USDClasses/Public/USDAssetCache3.h |
| Include Path | #include "USDAssetCache3.h" |
| Source | /Engine/Plugins/Runtime/USDCore/Source/USDClasses/Private/USDAssetCache3.cpp |
UFUNCTION (BlueprintCallable, Category="USD", Meta=(CallInEditor="true"))
UObject * GetOrCreateCachedAsset
(
const FString & Hash,
UClass * Class,
const FString & DesiredName,
int32 DesiredFlags,
bool & bOutCreatedAsset,
const UObject * Referencer
)
The asset that was returned or created
Parameters
| Name | Remarks |
|---|---|
| Hash | The string key to check with |
| Class | The class of the object that we want to retrieve or create from the asset cache |
| DesiredName | The name we want the created object to have (the actual name may have additional suffixes) |
| DesiredFlags | The flags we want the created object to have (the actual applied flags may differ depending on context) |
| bOutCreatedAsset | Set to true if we created the asset that was return, but false if we returned an existing asset |
| Referencer | The asset will not be deleted or untracked until this referencer is removed (via any of the RemoveAssetReferencer member functions) |