Im trying to apply a dynamic material instance to a static cone mesh. i can apply my non dynamic material normally, but when i try to create a dynamic version and apply that, it simply wont appear on the mesh in the PIE mode.
static ConstructorHelpers::FObjectFinder<UMaterial> ConeMaterial(TEXT("Material'/Game/Material/ConeMat.ConeMat'"));
//Create dynamic Material and store it
ConeMaterialInstance = UMaterialInstanceDynamic::Create(ConeMaterial.Object, this);
//set material to cone mesh
//ChangeMaterial Color to test
ConeMaterialInstance->SetVectorParameterValue(FName(TEXT("Color")), FLinearColor(2.0f, 0.0f, 0.0f, 1.0f));
For some reason the dynamic material doe not appear and instead shows the default grey check material.
I looked at this post for answers and implement what they said from it, but i still cant get it to work.
Any ideas would be great i think im missing something really basic.
I am investigating your report about the dynamic instances and would like to ask a couple of questions. Are you still experiencing this issue when using the 4.6 version of the engine? Are you trying to set up the dynamic material in the constructor or elsewhere in the class?
Thanks for following this up, i appreciate it. This was for a project i was doing many months ago, I no longer have the files. I found a workaround for it at the time. I know that’s not much help, sorry.
Since this is no longer a problem for you I will be marking this post as resolved for tracking purposes. If you do come across this issue in the future remember to check the latest version to see if it has already been addressed. If it is still a problem you can reopen this post with any details regarding the error or steps to reproduce it.