FActorLabelUtilities::SetActorLabelUnique

Assigns a new label to an actor.

Choose your operating system:

Windows

macOS

Linux

References

Module

UnrealEd

Header

/Engine/Source/Editor/UnrealEd/Classes/Editor/EditorEngine.h

Include

#include "Editor/EditorEngine.h"

Source

/Engine/Source/Editor/UnrealEd/Private/EditorEngine.cpp

Syntax

static void SetActorLabelUnique
(
    AActor * Actor,
    const FString & NewActorLabel,
    const FCachedActorLabels * InExistingActorLabels
)

Remarks

Assigns a new label to an actor. If the name exists it will be appended with a number to make it unique. Actor labels are only available in development builds.

Parameters

Parameter

Description

Actor

The actor to change the label of

NewActorLabel

The new label string to assign to the actor. If empty, the actor will have a default label.

InExistingActorLabels

(optional) Pointer to a set of actor labels that are currently in use