Navigation
API > API/Plugins > API/Plugins/USDClasses
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UUsdAssetCache2
References
| Module | USDClasses |
| Header | /Engine/Plugins/Importers/USDImporter/Source/USDClasses/Public/USDAssetCache2.h |
| Include | #include "USDAssetCache2.h" |
Syntax
UCLASS&40;BlueprintType, Blueprintable,
Meta&61;&40;DisplayName&61;"USD Asset Cache", ScriptName&61;"UsdAssetCache"&41;&41;
class UUsdAssetCache2 : public UObject
Remarks
Owns the assets generated and reused by USD Stages, allowing thread-safe retrieval/storage.
Variables
| Type | Name | Description | |
|---|---|---|---|
| double | PersistentAssetStorageSizeMB | This limit specifies how much size is allocated to storing all persistent assets (i.e. assets that will be saved to disk, even if unused by any stage). | |
| double | UnreferencedAssetStorageSizeMB | The asset cache will always retain all currently used assets. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | AddAssetReference
(
const UObject* Asset, |
Adds a new UObject referencer to a particular asset, returning true if the operation succeeded. | |
| void | CacheAsset
(
const FString& Hash, |
Adds an asset to the cache attached to a particular hash, and optionally registering a referencer | |
| bool | CanRemoveAsset
(
const FString& Hash |
Returns true if the asset with the given hash can be removed from the cache. | |
| TSet< UObject * > | Returns assets that aren't marked as stale | ||
| TArray< FString > | Returns all asset hashes tracked by the asset cache, for all storage types. | ||
| TArray< FString > | Returns all asset paths tracked by the asset cache, for all storage types. | ||
| TArray< UObject * > | Returns all assets that are currently loaded in the asset cache. | ||
| UObject * | GetCachedAsset
(
const FString& Hash |
Returns an asset associated with a particular `Hash_. | |
| FString | GetHashForAsset
(
const UObject* Asset |
Returns the hash associated with an asset, in case we own it. | |
| int32 | GetNumAssets () |
Returns how many assets are tracked by the asset cache in total (summing up persistent, referenced and unreferenced storage) | |
| bool | IsAssetOwnedByCache
(
const FString& AssetPath |
Returns true in case the asset at `AssetPath_ is tracked by the cache in any way (persistent asset, unreferenced or referenced). | |
| void | Every time an asset is retrieved/inserted we add it to ActiveAssets. | ||
| void | Updates which assets belong to each storage type. | ||
| bool | RemoveAllAssetReferences
(
const UObject* Referencer |
Removes the particular referencer to all assets tracked by the cache, if it was a referencer to any of them. | |
| UObject * | RemoveAsset
(
const FString& Hash |
If an asset is associated with `Hash_, it will be returned and the asset cache will stop tracking this asset entirely. | |
| bool | RemoveAssetReference
(
const UObject* Asset, |
Removes an UObject referencer from a particular asset, returning true if the operation succeeded. | |
| void | Reset () |
Discards all tracked assets across all storage types | |
| bool | TouchAsset
(
const UObject* Asset, |
Marks the provided asset as being used at this point, optionally adding a specific referencer. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Begin UObject interfacte. | |
| void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. | |
| void | Handles reading, writing, and reference collecting using FArchive. |
Enums
| Type | Name | Description | |
|---|---|---|---|
| ECacheStorageType | Describes the different "types of storage" we allow on the asset cache. |