UPrimitiveComponent::CreateAndSetMaterialInstanceDynamicFromMaterial

Creates a Dynamic Material Instance for the specified element index.

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 * CreateAndSetMaterialInstanceDynamicFromMaterial
(
    int32 ElementIndex,
    class UMaterialInterface * Parent
)

Remarks

Creates a Dynamic Material Instance for the specified element index. The parent of the instance is set to the material being replaced.

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