Navigation
API > API/Runtime > API/Runtime/AssetRegistry > API/Runtime/AssetRegistry/FAssetRegistryState
Description
Initializes a cache from an existing using a set of filters. This is more efficient than calling InitalizeFromExisting and then PruneAssetData.
| Name | InitializeFromExistingAndPrune |
| Type | function |
| Header File | /Engine/Source/Runtime/AssetRegistry/Public/AssetRegistry/AssetRegistryState.h |
| Include Path | #include "AssetRegistry/AssetRegistryState.h" |
| Source | /Engine/Source/Runtime/AssetRegistry/Private/AssetRegistryState.cpp |
void InitializeFromExistingAndPrune
(
const FAssetRegistryState & ExistingState,
const TSet< FName > & RequiredPackages,
const TSet< FName > & RemovePackages,
const TSet< int32 > ChunksToKeep,
const FAssetRegistrySerializationOptions & Options
)
Parameters
| Name | Remarks |
|---|---|
| ExistingState | State to use initialize from |
| RequiredPackages | If set, only these packages will be maintained. If empty it will keep all unless filtered by other parameters. |
| RemovePackages | These packages will be removed from the current set |
| ChunksToKeep | The list of chunks that are allowed to remain. Any assets in other chunks are pruned. If empty, all assets are kept regardless of chunk |
| Options | Serialization options to read filter info from |