Navigation
API > API/Editor > API/Editor/StaticMeshEditor > API/Editor/StaticMeshEditor/UStaticMeshEditorSubsystem
References
| Module | StaticMeshEditor |
| Header | /Engine/Source/Editor/StaticMeshEditor/Public/StaticMeshEditorSubsystem.h |
| Include | #include "StaticMeshEditorSubsystem.h" |
| Source | /Engine/Source/Editor/StaticMeshEditor/Private/StaticMeshEditorSubsystem.cpp |
UFUNCTION (BlueprintCallable, Category="Static Mesh Utilities")
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
| Name | Description |
|---|---|
| MeshComponents | List of MeshComponent to search from. |
| MaterialToBeReplaced | Material we want to replace. |
| NewMaterial | Material to replace MaterialToBeReplaced by. |