UUnrealEdEngine::ReplaceActor

Replaces the specified actor with a new actor of the specified class.

Windows
MacOS
Linux

References

Module

UnrealEd

Header

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

Include

#include "Editor/UnrealEdEngine.h"

Source

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

Syntax

virtual AActor * ReplaceActor
(
    AActor * CurrentActor,
    UClass * NewActorClass,
    UObject * Archetype,
    bool bNoteSelectionChange
)

Remarks

Replaces the specified actor with a new actor of the specified class. The new actor will be selected if the current actor was selected.

Returns

The new actor.

Parameters

Parameter

Description

CurrentActor

The actor to replace.

NewActorClass

The class for the new actor.

Archetype

The template to use for the new actor.

bNoteSelectionChange

If true, call NoteSelectionChange if the new actor was created successfully.

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