Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UMaterialInstanceDynamic
Description
Use the cached value of OutParameterIndex from InitializeScalarParameterAndGetIndex to set the scalar parameter ONLY on the exact same MID. Do NOT presume the index can be used from one instance on another. Only use this pair of functions when optimization is critical; otherwise use either SetScalarParameterValueByInfo or SetScalarParameterValue.
| Name | SetScalarParameterByIndex |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Public/Materials/MaterialInstanceDynamic.h |
| Include Path | #include "Materials/MaterialInstanceDynamic.h" |
| Source | /Engine/Source/Runtime/Engine/Private/Materials/MaterialInstanceDynamic.cpp |
UFUNCTION (BlueprintCallable, Meta=(Keywords="SetFloatParameterValue"),
Category="Rendering|Material")
bool SetScalarParameterByIndex
(
int32 ParameterIndex,
float Value
)