I’ve tried to set a Vector parameter that I can change in my level blueprint as a test of the function but it isn’t changing it like I want it. I must be setting it up wrong but I have no idea where.
Here is my simple material which is applied to the objects I want to change:
Then I have the Material Parameter Collection itself:
And finally the Level blueprints themselves:
The string prints but I see no change in the material I placed and I have no idea why haha
Your blueprint is fine, but the BaseColor output of the material expects RGB values between 0.0 and 1.0, not from 0 to 255, so you’ll have to divide those values by 255.
Ah you are correct it works now! interesting, I wouldn’t have thought it would do that haha I have also realised for what I’m doing which is just swapping between static colours, so changing material is prob a better bet for me as I don’t need an animated colour.
Thanks a lot!
Yeah I’m already using material instances anyway at least. Your right though, I imagine vector parameter is more efficient haha
By the way, for your purposes its even better to, instead of creating a material for each color, create one material with a vector parameter plugged into the color output and make material instances of that to set the vector parameter to the color you want to use. Just to be clear, I mean ‘static’ material instances, so by right clicking a material and creating a material instance asset.
This way, there is only one material to compile instead of multiple that essentially are the same.