How do I set a material's texture parameter value from code?

Get a dynamic material instace from selected mesh component like this for example

if (MatInst == NULL) MatInst = ((USkeletalMeshComponent*)GetRootComponent())->CreateAndSetMaterialInstanceDynamic(0);

Ofcorse declere MatInst in header file as UMaterialInstanceDynamic* ;] and from Dynamic Material Instance you can set parameters

https://docs.unrealengine.com/latest/INT/API/RuntimeModules/Engine/Materials/UMaterialInstanceDynamic/index.html
https://docs.unrealengine.com/latest/INT/API/RuntimeModules/Engine/Materials/UMaterialInstanceDynamic/SetTextureParame-/index.html

Thanks man that’s exactly what I was looking for!

I’ve created a Class Blueprint with a static mesh and applied a material instance on it. My material has a texture parameter in its blueprint and I want to change the texture in my Actor’s implemention at runtime. I can retrieve the material programmatically and am able to get the texture parameter value (pointer to a UTexture). But how do I set a parameter value through code?

My goal is to be able to change the texture on a material programmatically. Perhaps I attacked the problem the wrong way.

Thanks for your help

It no longer exist in UE 4.11. Any work around?