UEditorLevelLibrary::ReplaceMeshComponentsMaterials

Find the references of the material MaterialToReplaced on all the MeshComponents provided and replace it by NewMaterial.

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 ReplaceMeshComponentsMaterials
(
    const TArray< class UMeshComponent * > & MeshComponents,
    class UMaterialInterface * MaterialToBeReplaced,
    class UMaterialInterface * NewMaterial
)

Remarks

Find the references of the material MaterialToReplaced on all the MeshComponents provided and replace it by NewMaterial.

Parameters

Parameter

Description

MeshComponents

List of MeshComponent to search from.

MaterialToBeReplaced

Material we want to replace.

NewMaterial

Material to replace MaterialToBeReplaced 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