UEditorLevelLibrary::ReplaceMeshComponentsMeshes

Find the references of the mesh MeshToBeReplaced on all the MeshComponents provided and replace it by NewMesh.

Windows
MacOS
Linux

References

Module

EditorScriptingUtilities

Header

/Engine/Plugins/Editor/EditorScriptingUtilities/Source/EditorScriptingUtilities/Public/EditorLevelLibrary.h

Include

#include "EditorLevelLibrary.h"

Source

/Engine/Plugins/Editor/EditorScriptingUtilities/Source/EditorScriptingUtilities/Private/EditorLevelLibrary.cpp

Syntax

[UFUNCTION](Programming/UnrealArchitecture/Reference/Functions)(BlueprintCallable, Category="Editor Scripting | Dataprep")
static void ReplaceMeshComponentsMeshes
(
    const TArray< class UStaticMeshComponent * > & MeshComponents,
    class UStaticMesh * MeshToBeReplaced,
    class UStaticMesh * NewMesh
)

Remarks

Find the references of the mesh MeshToBeReplaced on all the MeshComponents provided and replace it by NewMesh. The editor should not be in play in editor mode.

Parameters

Parameter

Description

MeshComponents

List of MeshComponent to search from.

MeshToBeReplaced

Mesh we want to replace.

NewMesh

Mesh to replace MeshToBeReplaced by.

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