FPackageName::TryConvertGameRelativePackagePathToLocalPath

Tries to convert a file or directory in game-relative package name format to the corresponding local path Game-relative package names can be a full package path (/Game/Folder/File, /Engine/Folder/File, /PluginName/Folder/File) or a relative path (Folder/File).

Windows
MacOS
Linux

References

Module

CoreUObject

Header

/Engine/Source/Runtime/CoreUObject/Public/Misc/PackageName.h

Include

#include "Misc/PackageName.h"

Source

/Engine/Source/Runtime/CoreUObject/Private/Misc/PackageName.cpp

Syntax

static bool TryConvertGameRelativePackagePathToLocalPath
(
    FStringView RelativePackagePath,
    FString & OutLocalPath
)

Remarks

Tries to convert a file or directory in game-relative package name format to the corresponding local path Game-relative package names can be a full package path (/Game/Folder/File, /Engine/Folder/File, /PluginName/Folder/File) or a relative path (Folder/File). Full package paths must be in a mounted directory to be successfully converted.

Returns

Whether the conversion was successful.

Parameters

Parameter

Description

RelativePackagePath

The path in game-relative package format (allowed to have or not have an extension).

OutLocalPath

The corresponding local-path file (with the extension or lack of extension from the input).

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss