UPrimitiveComponent::SetMaterial

Changes the material applied to an element of the mesh.

Windows
MacOS
Linux

Override Hierarchy

Syntax

virtual void SetMaterial
(
    int32 ElementIndex,
    class UMaterialInterface * Material
)

Remarks

Changes the material applied to an element of the mesh.

Returns

the material used by the indexed element of this mesh.

Parameters

Parameter

Description

ElementIndex

The element to access the material of.

References

Module

Engine

Header

Runtime/Engine/Classes/Components/PrimitiveComponent.h

Source

Runtime/Engine/Private/Components/PrimitiveComponent.cpp

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback