FPackagePath::TryFromMountedName

Construct a PackagePath from a LocalPath or PackageName string, assuming the given LocalPath or PackageName is in a directory that is mounted (aka registered with [FPackageName::MountPointExists](API\Runtime\CoreUObject\Misc\FPackageName\MountPointExists))

Choose your operating system:

Windows

macOS

Linux

References

Module

CoreUObject

Header

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

Include

#include "Misc/PackagePath.h"

Source

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

Syntax

static bool TryFromMountedName
(
    FStringView InPackageNameOrHeaderFilePath,
    FPackagePath & OutPackagePath
)

Remarks

Construct a PackagePath from a LocalPath or PackageName string, assuming the given LocalPath or PackageName is in a directory that is mounted (aka registered with FPackageName::MountPointExists)

Returns

True if the input string was found in a mounted path and OutPackagePath has been set, false otherwise

Parameters

Parameter

Description

InPackageNameOrHeaderFilePath

A string that describes either the PackageName or LocalPath of a PackagePath

OutPackagePath

If the function succeeds, the created PackagePath is assigned to this variable. Otherwise this variable is not written