MakeUniqueObjectName

Create a unique name by combining a base name and an arbitrary number string.

Windows
MacOS
Linux

References

Module

CoreUObject

Header

/Engine/Source/Runtime/CoreUObject/Public/UObject/UObjectGlobals.h

Include

#include "UObject/UObjectGlobals.h"

Source

/Engine/Source/Runtime/CoreUObject/Private/UObject/UObjectGlobals.cpp

Syntax

FName MakeUniqueObjectName
(
    UObject * Outer,
    const UClass * Class,
    FName BaseName
)

Remarks

Create a unique name by combining a base name and an arbitrary number string. The object name returned is guaranteed not to exist.

Returns

name is the form BaseName_##, where ## is the number of objects of this type that have been created since the last time the class was garbage collected.

Parameters

Parameter

Description

Parent

the outer for the object that needs to be named

Class

the class for the object

BaseName

optional base name to use when generating the unique object name; if not specified, the class's name is used

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