Navigation
API > API/Editor > API/Editor/UnrealEd > API/Editor/UnrealEd/UUnrealEdEngine
Description
Replaces the specified actor with a new actor of the specified class. The new actor will be selected if the current actor was selected.
| Name | ReplaceActor |
| Type | function |
| Header File | /Engine/Source/Editor/UnrealEd/Classes/Editor/UnrealEdEngine.h |
| Include Path | #include "Editor/UnrealEdEngine.h" |
| Source | /Engine/Source/Editor/UnrealEd/Private/EditorActor.cpp |
virtual AActor * ReplaceActor
(
AActor * CurrentActor,
UClass * NewActorClass,
UObject * Archetype,
bool bNoteSelectionChange
)
The new actor.
Parameters
| Name | Remarks |
|---|---|
| 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. |