Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UPrimitiveComponent
Description
Creates a Dynamic Material Instance for the specified element index. The parent of the instance is set to the material being replaced.
| Name | CreateAndSetMaterialInstanceDynamic |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/Components/PrimitiveComponent.h |
| Include Path | #include "Components/PrimitiveComponent.h" |
| Source | /Engine/Source/Runtime/Engine/Private/Components/PrimitiveComponent.cpp |
UFUNCTION (BlueprintCallable,
Meta=(DisplayName="CreateMIDForElement", DeprecatedFunction, DeprecationMessage="Use CreateDynamicMaterialInstance instead."),
Category="Rendering|Material")
virtual UMaterialInstanceDynamic * CreateAndSetMaterialInstanceDynamic
(
int32 ElementIndex
)
Parameters
| Name | Remarks |
|---|---|
| ElementIndex | The index of the skin to replace the material for. If invalid, the material is unchanged and NULL is returned. |