RealDocs

UAssetManager::Unregister_OnAddedAssetSearchRoot

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

Description

Removes a previously registered callback for the new-asset-search-root notification.

Caveats & Gotchas

  • Passing an invalid or already-unregistered handle is silently ignored rather than asserting.
  • You must keep the FDelegateHandle returned by Register_OnAddedAssetSearchRoot to call this — there is no way to unregister by object/function pointer alone.

Signature

void Unregister_OnAddedAssetSearchRoot(FDelegateHandle DelegateHandle);

Parameters

Name Type Description Default
DelegateHandle FDelegateHandle Handle returned by the earlier call to Register_OnAddedAssetSearchRoot.

Return Type

void

Example

Unregister in destructor C++
// Store the handle when registering
FDelegateHandle SearchRootHandle = UAssetManager::Get().Register_OnAddedAssetSearchRoot(
	FOnAddedAssetSearchRoot::FDelegate::CreateUObject(this, &UMySubsystem::OnRootAdded));

// Later, e.g. in Deinitialize()
UAssetManager::Get().Unregister_OnAddedAssetSearchRoot(SearchRootHandle);

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.