/Engine/Source/Runtime/Engine/Classes/Materials/MaterialInstanceDynamic.h
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.
bool SetScalarParameterByIndex ( int32 ParameterIndex, float Value )