Navigation
API > API/Plugins > API/Plugins/USDClasses
Owns the assets generated and reused by the USD stage, allowing thread-safe retrieval/storage
| Name | UUsdAssetCache |
| Type | class |
| Header File | /Engine/Plugins/Runtime/USDCore/Source/USDClasses/Public/USDAssetCache.h |
| Include Path | #include "USDAssetCache.h" |
Syntax
UCLASS (Meta=(ScriptName="UsdAssetCache_Deprecated"))
class UUsdAssetCache : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UUsdAssetCache
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UUsdAssetCache() |
USDAssetCache.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActiveAssets | TSet< UObject * > | Assets that were added/retrieved since the last call to MarkAssetsAsSlate();. | USDAssetCache.h | |
| bAllowPersistentStorage | bool | USDAssetCache.h |
|
|
| CriticalSection | FCriticalSection | Used to ensure thread safety. | USDAssetCache.h | |
| OwnedAssets | TSet< TWeakObjectPtr< UObject > > | Points to the assets in primary storage, used to quickly check if we own an asset. | USDAssetCache.h |
|
| PersistentStorage | TMap< FString, TObjectPtr< UObject > > | USDAssetCache.h |
|
|
| PrimPathToAssets | TMap< FString, TWeakObjectPtr< UObject > > | Keeps associations from prim paths to assets that we own in primary storage. | USDAssetCache.h |
|
| TransientStorage | TMap< FString, TObjectPtr< UObject > > | For now everything is NonPIEDuplicateTransient as this is mostly a subobject of AUsdStageActor. | USDAssetCache.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| USDAssetCache.h | |||
void DiscardAsset
(
const FString& Hash |
USDAssetCache.h | ||
TSet< UObject * > GetActiveAssets() |
Returns assets that aren't marked as stale | USDAssetCache.h | |
| USDAssetCache.h | |||
TMap< FString, TWeakObjectPtr< UObject > > GetAssetPrimLinks() |
USDAssetCache.h | ||
| USDAssetCache.h | |||
TMap< FString, TObjectPtr< UObject > > GetCachedAssets() |
USDAssetCache.h | ||
| Returns the hash used as a key for an asset, in case we own it. Returns the empty string otherwise. | USDAssetCache.h | ||
int32 GetNumAssets() |
USDAssetCache.h | ||
| Returns the first prim path associated with an asset (see TMap::FindKey) | USDAssetCache.h | ||
bool IsAssetOwnedByCache
(
UObject* Asset |
USDAssetCache.h | ||
| USDAssetCache.h | |||
void MarkAssetsAsStale () |
Every time an asset is retrieved/inserted we add it to ActiveAssets. | USDAssetCache.h | |
void RemoveAssetPrimLink
(
const FString& PrimPath |
USDAssetCache.h | ||
void Reset() |
USDAssetCache.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
USDAssetCache.h | ||
virtual void Serialize
(
FArchive& Ar |
We need to be serializable so that AUsdStageActor can duplicate us for PIE. | USDAssetCache.h |