Change a material instance property of ALL objects using it during runtime
I have a large area covered with trees using a procedural foliage spawner. I would like to simulate fall by changing a property in my leaves material instance (3 color parameter with an orange color that blends with the base texture).
When I open my material instance and change a parameter, every actor that uses this material changes realtime. Is there a way to do it like that but during runtime without having to go through all actors and change it one by one via a foreach loop?
asked Mar 13 '19 at 10:26 PM in Blueprint Scripting
yes, materials can be changed at runtime via either a dynamic material instance or a material parameter collection.
dynamic material instancing may work depending on how you're set up, but if you want the same value across all of the trees then a parameter collection may be easier to implement since it can be change from anywhere without needing to get references.
Follow this question
Once you sign in you will be able to subscribe for any updates here