FPackageName::IsValidObjectPath

Returns true if the path starts with a valid root (i.e. /Game/, /Engine/, etc) and contains no illegal characters.

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 IsValidObjectPath
(
    const FString & InObjectPath,
    FText * OutReason
)

Remarks

Returns true if the path starts with a valid root (i.e. /Game/, /Engine/, etc) and contains no illegal characters. This validates that the packagename is valid, and also makes sure the object after package name is also correct. This will return false if passed a path starting with Classname'

Returns

true if a valid object path

Parameters

Parameter

Description

InObjectPath

The object path to test

OutReason

When returning false, this will provide a description of what was wrong with the name.

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