RealDocs

UAssetManager::OnAssetRegistryAvailableAfterInitialization

function Engine Since 4.24
#include "Engine/AssetManager.h"
Access: public Specifiers: virtual

Description

Called when a new asset registry (for example a plugin or DLC registry) becomes available after the engine has already initialized. Returns true if new data was loaded and merged into the master asset registry.

Caveats & Gotchas

  • InName must exactly match whatever GetUniqueAssetRegistryName returns for that source, or the callback won't be matched to the correct registry.
  • Fires for registries that arrive after initial startup (e.g. mounted plugins, downloaded content) — registries already present at boot go through the normal startup scan instead and never hit this path.

Signature

virtual bool OnAssetRegistryAvailableAfterInitialization(FName InName, FAssetRegistryState& OutNewState)

Parameters

Name Type Description Default
InName FName Logical name of the newly available asset registry; must match the name returned by GetUniqueAssetRegistryName.
OutNewState FAssetRegistryState& Filled with the new registry state to merge into the master asset registry.

Return Type

bool

Example

Override to merge a custom plugin registry C++
bool UMyAssetManager::OnAssetRegistryAvailableAfterInitialization(FName InName, FAssetRegistryState& OutNewState)
{
	if (InName == TEXT("MyPluginRegistry"))
	{
		// Populate OutNewState from the plugin's cached registry file
		return true;
	}
	return Super::OnAssetRegistryAvailableAfterInitialization(InName, OutNewState);
}

Version History

Introduced in: 4.24

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.