How do I change a material color at runtime?
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.
I don't need help with the color change code I just need to know how to access the material's color. Thanks to anyone that helps.
asked Sep 13 '18 at 12:02 PM in C++ Programming
You need to have a parameter in the material you are trying to edit with the same name as the one you are trying to pass into that function, in your case a vector parameter with the name "color".
answered Sep 14 '18 at 01:04 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here