Hi,
I am unable to change my material’s colour on the fly and not sure why.
Here’s my code, it’s pretty simple:
.h
UMaterialInstanceDynamic*
GlovesMaterialInstanceDynamic;
.cpp
UMaterialInterface* MeshMat =
Mesh1P->GetMaterial(0);GlovesMaterialInstanceDynamic =
UMaterialInstanceDynamic::Create(MeshMat,
this);
…
GlovesMaterialInstanceDynamic->SetVectorParameterValue(FName(TEXT(“Color”)),
FLinearColor(2.0,0.0,0.0,1.0));
My material has a vector parameter called Color in it’s emissive and basecolor inputs.
Am I missing something super simple here?
Thanks,
Jon