I ma making an atmosphere simulation that has a grid of cubes for visual representation. I want the material on each cube static mesh to change color according to a float variable. I can create this behavior except for one problem, I can’t figure out how to change a material’s base color in C++.
I have tried the examples below and it doesn’t work.
No, you need to setup one yourself, because you can use vector parameters for almost everything in the material editor (color is just a very basic example of using it).
As for the inaccessible, that may be just an intellisense error. As long as it compiles, there should be no problem. I use the SetVectorParameter function a lot myself and never had any problems with it thus far.