Navigation
API > API/Runtime > API/Runtime/AssetRegistry > API/Runtime/AssetRegistry/IAssetDependencyGatherer
Description
Return the extra dependencies to add to the given AssetData, which is guaranteed to have ClassType equal to the class for which the Gatherer was registered.
WARNING: For high performance these callbacks are called inside the critical section of the AssetRegistry. Attempting to call public functions on the AssetRegistry will deadlock. To send queries about what assets exist, used the passed-in interface functions instead.
| Name | GatherDependencies |
| Type | function |
| Header File | /Engine/Source/Runtime/AssetRegistry/Public/AssetRegistry/AssetDependencyGatherer.h |
| Include Path | #include "AssetRegistry/AssetDependencyGatherer.h" |
void GatherDependencies
(
const FAssetData & AssetData,
const FAssetRegistryState & AssetRegistryState,
TFunctionRef < FARCompiledFilter> CompileFilterFunc,
TArray< IAssetDependencyGatherer::FGathereredDependency > & OutDependencies,
TArray< FString > & OutDependencyDirectories
) const
Parameters
| Name | Remarks |
|---|---|
| AssetData | The Asset to which the dependencies will be added |
| AssetRegistryState | Helper object: The AssetRegistry's internal state which can be used to run queries in the callback. This must be used instead of the usual interface functions on IAssetRegistry::GetChecked(), because the callback executes inside the critical section. |
| CompileFilterFunc | Helper object: Used to compile FARFilter into FARCompiledFilter for queries sent to AssetRegistryState. The same functionality that is normally provided by IAssetRegistry::GetChecked().CompileFilter. |
| OutDependencies | List of directories that the callback queried. The AssetRegistry will call the callback again if any assets are added to any of these directories. |