UPrimitiveComponent::CreateDynamicMaterialInstance

Creates a Dynamic Material Instance for the specified element index, optionally from the supplied material.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Components/PrimitiveComponent.h

Include

#include "Components/PrimitiveComponent.h"

Source

/Engine/Source/Runtime/Engine/Private/Components/PrimitiveComponent.cpp

Syntax

virtual UMaterialInstanceDynamic * CreateDynamicMaterialInstance
(
    int32 ElementIndex,
    class UMaterialInterface * SourceMaterial,
    FName OptionalName
)

Remarks

Creates a Dynamic Material Instance for the specified element index, optionally from the supplied material.

Parameters

Parameter

Description

ElementIndex

The index of the skin to replace the material for. If invalid, the material is unchanged and NULL is returned.

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