UEditorEngine::DoConvertActors

Converts passed in actors into new actors of the specified type.

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

void DoConvertActors
(
    const TArray< AActor * > & ActorsToConvert,
    UClass * ConvertToClass,
    const TSet< FString > & ComponentsToConsider,
    bool bUseSpecialCases,
    const FString & InStaticMeshPackageName
)

Remarks

Converts passed in actors into new actors of the specified type. Note: This replaces the old actors with brand new actors while attempting to preserve as many properties as possible. Properties of the actors components are also attempted to be copied for any component names supplied in the third parameter. If a component name is specified, it is only copied if a component of the specified name exists in the source and destination actors, as well as in the class default object of the class of the source actor, and that all three of those components share a common base class. This approach is used instead of simply accepting component classes to copy because some actors could potentially have multiple of the same component type.

Parameters

Parameter

Description

ActorsToConvert

Array of actors which should be converted to the new class type

ConvertToClass

Class to convert the provided actors to

ComponentsToConsider

Names of components to consider for property copying as well

bUseSpecialCases

If true, looks for classes that can be handled by hardcoded conversions

InStaticMeshPackageName

The name to save the brushes to.

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