Sharing Dynamic Material Instances
I have an actor with many attached StaticMeshActors. I want to modify the materials for all of them at runtime. I could get all the attached actors, and ForEach create a new Dynamic Material Instance, and modify that instance as desired. However, if I have 1500 meshes sharing 100 materials, I really only need to create 100 Dynamic Material Instances, not 1500.
I'd appreciate any advice on how to construct a Blueprint script that:
Alternatively (less optimal, but maybe easier to author?) it could be:
when you create the dynamic material instance, right click the bluepin on the right and promote it to a variable. Then set that variable in the foreach loop for all of them instead of creating a new one everytime. Any change you make the parameters in that variable will affect all of them.
answered Feb 07 '18 at 02:10 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here