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?
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.