RealDocs

UAssetManager::GetAssetSearchRoots

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

Description

Returns all registered game asset search roots, including /Game by default plus any added dynamically via AddAssetSearchRoot.

Caveats & Gotchas

  • The returned reference is to internal state — copy it if you need to keep the list beyond the current scope.
  • Passing bIncludeDefaultRoots=false returns only the dynamically registered roots, which is often empty in projects that never call AddAssetSearchRoot.

Signature

const TArray<FString>& GetAssetSearchRoots(bool bIncludeDefaultRoots = true) const;

Parameters

Name Type Description Default
bIncludeDefaultRoots bool If true, includes /Game and other built-in default roots alongside any dynamically added ones. true

Return Type

const TArray<FString>&

Example

List current search roots C++
for (const FString& Root : UAssetManager::Get().GetAssetSearchRoots())
{
	UE_LOG(LogTemp, Log, TEXT("Asset root: %s"), *Root);
}

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.