RealDocs

UAssetManager::CallOrRegister_OnAssetManagerCreated

function Engine Since unknown
#include "Engine/AssetManager.h"
Access: public Specifiers: static

Description

Registers a delegate to run once the AssetManager singleton has been created, invoking it immediately if the singleton already exists.

Caveats & Gotchas

  • Fires before the initial asset scan completes — use CallOrRegister_OnCompletedInitialScan instead if you need primary assets to already be scanned.
  • Useful for game modules that need to hook into UAssetManager::Get() safely without racing its lazy construction, since calling Get() too early can trigger construction in an unexpected order.

Signature

static ENGINE_API void CallOrRegister_OnAssetManagerCreated(FSimpleMulticastDelegate::FDelegate&& Delegate);

Parameters

Name Type Description Default
Delegate FSimpleMulticastDelegate::FDelegate&& Delegate to invoke once the AssetManager singleton has been constructed.

Return Type

void

Example

Hooking module startup to AssetManager creation C++
UAssetManager::CallOrRegister_OnAssetManagerCreated(FSimpleMulticastDelegate::FDelegate::CreateLambda([]()
{
	UAssetManager::Get().PushBulkScanning();
}));

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.