UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FTopLevelAssetPath Struct Reference

#include <TopLevelAssetPath.h>

Public Member Functions

 FTopLevelAssetPath ()
 
 FTopLevelAssetPath (TYPE_OF_NULLPTR)
 
 FTopLevelAssetPath (FName InPackageName, FName InAssetName)
 
 UE_DEPRECATED (5.0, "FNames containing full asset paths have been replaced by FTopLevelAssetPath/FSoftLevelObjectPath." "This function is only for temporary use interfacing with APIs that still produce an FName." "Those APIS should be updated to use FTopLevelAssetPath or FSoftLevelObjectPath.") explicit FTopLevelAssetPath(FName InPath)
 
 FTopLevelAssetPath (const FString &Path)
 
template<typename CharType , typename = typename std::enable_if<TIsCharType<CharType>::Value>::type>
 FTopLevelAssetPath (TStringView< CharType > Path)
 
template<typename CharType , typename = typename std::enable_if<TIsCharType<CharType>::Value>::type>
 FTopLevelAssetPath (const CharType *Path)
 
 FTopLevelAssetPath (const UObject *InObject)
 
FTopLevelAssetPathoperator= (const FString &Path)
 
template<typename CharType >
FTopLevelAssetPathoperator= (TStringView< CharType > Path)
 
template<typename CharType , typename = typename std::enable_if<TIsCharType<CharType>::Value>::type>
FTopLevelAssetPathoperator= (const CharType *Path)
 
FTopLevelAssetPathoperator= (TYPE_OF_NULLPTR)
 
COREUOBJECT_API bool TrySetPath (FName InPackageName, FName InAssetName)
 
COREUOBJECT_API bool TrySetPath (const UObject *InObject)
 
COREUOBJECT_API bool TrySetPath (FWideStringView Path)
 
COREUOBJECT_API bool TrySetPath (FUtf8StringView Path)
 
COREUOBJECT_API bool TrySetPath (FAnsiStringView Path)
 
template<typename CharType , typename = typename std::enable_if<TIsCharType<CharType>::Value>::type>
bool TrySetPath (const CharType *Path)
 
bool TrySetPath (const FString &Path)
 
COREUOBJECT_API bool RemapPackage (FName OldPackageName, FName NewPackageName)
 
FName GetPackageName () const
 
FName GetAssetName () const
 
COREUOBJECT_API void AppendString (FWideStringBuilderBase &Builder) const
 
COREUOBJECT_API void AppendString (FUtf8StringBuilderBase &Builder) const
 
COREUOBJECT_API void AppendString (FString &OutString) const
 
COREUOBJECT_API FString ToString () const
 
COREUOBJECT_API void ToString (FString &OutString) const
 
 UE_DEPRECATED (5.1, "FNames containing full asset paths have been replaced by FTopLevelAssetPath/FSoftLevelObjectPath." "This function is only for temporary use interfacing with APIs that still expect an FName." "Those APIS should be updated to use FTopLevelAssetPath or FSoftLevelObjectPath.") FName ToFName() const
 
bool IsValid () const
 
bool IsNull () const
 
void Reset ()
 
bool operator== (FTopLevelAssetPath const &Other) const
 
bool operator!= (FTopLevelAssetPath const &Other) const
 
int32 Compare (const FTopLevelAssetPath &Other) const
 
int32 CompareFast (const FTopLevelAssetPath &Other) const
 
COREUOBJECT_API bool ExportTextItem (FString &ValueStr, FTopLevelAssetPath const &DefaultValue, UObject *Parent, int32 PortFlags, UObject *ExportRootScope) const
 
COREUOBJECT_API bool ImportTextItem (const TCHAR *&Buffer, int32 PortFlags, UObject *Parent, FOutputDevice *ErrorText, FArchive *InSerializingArchive=nullptr)
 
COREUOBJECT_API bool SerializeFromMismatchedTag (const FPropertyTag &Tag, FStructuredArchive::FSlot Slot)
 
COREUOBJECT_API void WriteCompactBinary (FCbWriter &Writer) const
 

Friends

FArchiveoperator<< (FArchive &Ar, FTopLevelAssetPath &Path)
 
void operator<< (FStructuredArchive::FSlot Slot, FTopLevelAssetPath &Path)
 
uint32 GetTypeHash (FTopLevelAssetPath const &This)
 
FCbWriteroperator<< (FCbWriter &Writer, const FTopLevelAssetPath &Path)
 
COREUOBJECT_API friend bool LoadFromCompactBinary (FCbFieldView Field, FTopLevelAssetPath &OutPath)
 
COREUOBJECT_API friend void SerializeForLog (FCbWriter &Writer, const FTopLevelAssetPath &Value)
 

Constructor & Destructor Documentation

◆ FTopLevelAssetPath() [1/7]

FTopLevelAssetPath::FTopLevelAssetPath ( )
inline

◆ FTopLevelAssetPath() [2/7]

FTopLevelAssetPath::FTopLevelAssetPath ( TYPE_OF_NULLPTR  )
inline

◆ FTopLevelAssetPath() [3/7]

FTopLevelAssetPath::FTopLevelAssetPath ( FName  InPackageName,
FName  InAssetName 
)
inline

Construct directly from components

◆ FTopLevelAssetPath() [4/7]

FTopLevelAssetPath::FTopLevelAssetPath ( const FString &  Path)
inlineexplicit

Construct from string / string view / raw string of a supported character type.

◆ FTopLevelAssetPath() [5/7]

template<typename CharType , typename = typename std::enable_if<TIsCharType<CharType>::Value>::type>
FTopLevelAssetPath::FTopLevelAssetPath ( TStringView< CharType >  Path)
inlineexplicit

◆ FTopLevelAssetPath() [6/7]

template<typename CharType , typename = typename std::enable_if<TIsCharType<CharType>::Value>::type>
FTopLevelAssetPath::FTopLevelAssetPath ( const CharType *  Path)
inlineexplicit

◆ FTopLevelAssetPath() [7/7]

FTopLevelAssetPath::FTopLevelAssetPath ( const UObject InObject)
inlineexplicit

Construct from an existing object. Creates an empty path if the object is not a package or the direct inner of a package.

Member Function Documentation

◆ AppendString() [1/3]

void FTopLevelAssetPath::AppendString ( FString &  OutString) const

Append the full asset path (e.g. '/Path/To/Package.AssetName') to the string.

◆ AppendString() [2/3]

void FTopLevelAssetPath::AppendString ( FUtf8StringBuilderBase Builder) const

◆ AppendString() [3/3]

void FTopLevelAssetPath::AppendString ( FWideStringBuilderBase Builder) const

Append the full asset path (e.g. '/Path/To/Package.AssetName') to the string builder.

◆ Compare()

int32 FTopLevelAssetPath::Compare ( const FTopLevelAssetPath Other) const
inline

Lexically compares two paths.

◆ CompareFast()

int32 FTopLevelAssetPath::CompareFast ( const FTopLevelAssetPath Other) const
inline

Compares two paths in a fast non-lexical order that is only valid for process lifetime.

◆ ExportTextItem()

bool FTopLevelAssetPath::ExportTextItem ( FString &  ValueStr,
FTopLevelAssetPath const &  DefaultValue,
UObject Parent,
int32  PortFlags,
UObject ExportRootScope 
) const

◆ GetAssetName()

FName FTopLevelAssetPath::GetAssetName ( ) const
inline

Return the asset name part e.g. AssetName as an FName.

◆ GetPackageName()

FName FTopLevelAssetPath::GetPackageName ( ) const
inline

Return the package name part e.g. /Path/To/Package as an FName.

◆ ImportTextItem()

bool FTopLevelAssetPath::ImportTextItem ( const TCHAR *&  Buffer,
int32  PortFlags,
UObject Parent,
FOutputDevice ErrorText,
FArchive InSerializingArchive = nullptr 
)

◆ IsNull()

bool FTopLevelAssetPath::IsNull ( ) const
inline

Checks to see if this is initialized to null

◆ IsValid()

bool FTopLevelAssetPath::IsValid ( ) const
inline

Check if this could possibly refer to a real object

◆ operator!=()

bool FTopLevelAssetPath::operator!= ( FTopLevelAssetPath const &  Other) const
inline

Compares two paths for non-case-sensitive inequality.

◆ operator=() [1/4]

template<typename CharType , typename = typename std::enable_if<TIsCharType<CharType>::Value>::type>
FTopLevelAssetPath & FTopLevelAssetPath::operator= ( const CharType *  Path)
inline

◆ operator=() [2/4]

FTopLevelAssetPath & FTopLevelAssetPath::operator= ( const FString &  Path)
inline

Assign from the same types we can construct from

◆ operator=() [3/4]

template<typename CharType >
FTopLevelAssetPath & FTopLevelAssetPath::operator= ( TStringView< CharType >  Path)
inline

◆ operator=() [4/4]

FTopLevelAssetPath & FTopLevelAssetPath::operator= ( TYPE_OF_NULLPTR  )
inline

◆ operator==()

bool FTopLevelAssetPath::operator== ( FTopLevelAssetPath const &  Other) const
inline

Compares two paths for non-case-sensitive equality.

◆ RemapPackage()

bool FTopLevelAssetPath::RemapPackage ( FName  OldPackageName,
FName  NewPackageName 
)

Remap the package to handle renames.

◆ Reset()

void FTopLevelAssetPath::Reset ( )
inline

Resets reference to point to null

◆ SerializeFromMismatchedTag()

bool FTopLevelAssetPath::SerializeFromMismatchedTag ( const FPropertyTag Tag,
FStructuredArchive::FSlot  Slot 
)

◆ ToString() [1/2]

FString FTopLevelAssetPath::ToString ( ) const

Return the full asset path (e.g. '/Path/To/Package.AssetName') as a string.

◆ ToString() [2/2]

void FTopLevelAssetPath::ToString ( FString &  OutString) const

Copy the full asset path (e.g. '/Path/To/Package.AssetName') into the provided string.

◆ TrySetPath() [1/7]

template<typename CharType , typename = typename std::enable_if<TIsCharType<CharType>::Value>::type>
bool FTopLevelAssetPath::TrySetPath ( const CharType *  Path)
inline

◆ TrySetPath() [2/7]

bool FTopLevelAssetPath::TrySetPath ( const FString &  Path)
inline

◆ TrySetPath() [3/7]

bool FTopLevelAssetPath::TrySetPath ( const UObject InObject)

Sets asset path to path of existing object. Sets an empty path and returns false if the object is not a package or the direct inner of a package.

◆ TrySetPath() [4/7]

bool FTopLevelAssetPath::TrySetPath ( FAnsiStringView  Path)

◆ TrySetPath() [5/7]

bool FTopLevelAssetPath::TrySetPath ( FName  InPackageName,
FName  InAssetName 
)

Sets asset path of this reference based on components.

◆ TrySetPath() [6/7]

bool FTopLevelAssetPath::TrySetPath ( FUtf8StringView  Path)

◆ TrySetPath() [7/7]

bool FTopLevelAssetPath::TrySetPath ( FWideStringView  Path)

Sets asset path of this reference based on a string path. Resets this object and returns false if the string is empty or does not represent a top level asset path.

◆ UE_DEPRECATED() [1/2]

FTopLevelAssetPath::UE_DEPRECATED ( 5.  0,
"FNames containing full asset paths have been replaced by FTopLevelAssetPath/FSoftLevelObjectPath." "This function is only for temporary use interfacing with APIs that still produce an FName." "Those APIS should be updated to use FTopLevelAssetPath or FSoftLevelObjectPath."   
)
inline

◆ UE_DEPRECATED() [2/2]

FTopLevelAssetPath::UE_DEPRECATED ( 5.  1,
"FNames containing full asset paths have been replaced by FTopLevelAssetPath/FSoftLevelObjectPath." "This function is only for temporary use interfacing with APIs that still expect an FName." "Those APIS should be updated to use FTopLevelAssetPath or FSoftLevelObjectPath."   
) const
inline

◆ WriteCompactBinary()

void FTopLevelAssetPath::WriteCompactBinary ( FCbWriter Writer) const

Friends And Related Symbol Documentation

◆ GetTypeHash

uint32 GetTypeHash ( FTopLevelAssetPath const &  This)
friend

◆ LoadFromCompactBinary

COREUOBJECT_API friend bool LoadFromCompactBinary ( FCbFieldView  Field,
FTopLevelAssetPath OutPath 
)
friend

◆ operator<< [1/3]

FArchive & operator<< ( FArchive Ar,
FTopLevelAssetPath Path 
)
friend

Serializes the internal path. Unlike FSoftObjectPath, does not handle any PIE or redirector fixups.

◆ operator<< [2/3]

FCbWriter & operator<< ( FCbWriter Writer,
const FTopLevelAssetPath Path 
)
friend

◆ operator<< [3/3]

void operator<< ( FStructuredArchive::FSlot  Slot,
FTopLevelAssetPath Path 
)
friend

Serializes the internal path. Unlike FSoftObjectPath, does not handle any PIE or redirector fixups.

◆ SerializeForLog

COREUOBJECT_API friend void SerializeForLog ( FCbWriter Writer,
const FTopLevelAssetPath Value 
)
friend

The documentation for this struct was generated from the following files: