UEditorLevelLibrary::ReplaceMeshComponentsMaterialsOnActors

Find the references of the material MaterialToReplaced on all the MeshComponents of all the Actors 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 ReplaceMeshComponentsMaterialsOnActors
(
    const TArray< class AActor * > & Actors,
    class UMaterialInterface * MaterialToBeReplaced,
    class UMaterialInterface * NewMaterial
)

Remarks

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

Parameters

Parameter

Description

Actors

List of Actors 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