RealDocs

UAssetManager::GetRedirectedAssetPath

function Engine Since 4.22
#include "Engine/AssetManager.h"
Access: public Specifiers: virtualconst

Description

Reads the Asset Manager settings for specifically redirected asset paths and returns the current path. Useful for converting older saved data that references assets by their pre-move path.

Caveats & Gotchas

  • This is a separate redirector list from GetRedirectedPrimaryAssetId — it operates on raw soft object paths, not Primary Asset Ids, so both may need to be checked when migrating save data.
  • Returns OldPath unchanged if no matching redirect entry exists, so callers should not assume the result differs from the input.

Signature

virtual FSoftObjectPath GetRedirectedAssetPath(const FSoftObjectPath& OldPath) const

Parameters

Name Type Description Default
OldPath const FSoftObjectPath& Soft object path that may have been redirected in Asset Manager settings.

Return Type

FSoftObjectPath

Example

Fix up a saved soft path on load C++
FSoftObjectPath SavedPath(TEXT("/Game/Old/BP_Sword.BP_Sword"));
FSoftObjectPath CurrentPath = UAssetManager::Get().GetRedirectedAssetPath(SavedPath);

Version History

Introduced in: 4.22

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.