Ok I have tried everything I can think of and everything I have found on the web for changing the base color of a material for a static mesh from C++ and cannot get it to work.
Basic creation code is normal, create the static mesh component, load ‘/Engine/BasicShapes/Cube.Cube’ mesh and assign it to the component. That works fine.
I get the material 0 for the mesh, create UMaterialInstanceDynamic from it and assign the mesh back to the static mesh component.
The thing is no matter what change I make to the UMaterialInstanceDynamic, it never has any effect on what is displayed, it still just displays the original mesh and material intact.
Can anyone point to a simple (working) example of just changing the base color of a static mesh ? I just want to highlight my box when something happens.