Restore All Materials
Help me to restore all materials of my level.
I need termopary override all static meshes materials to single specific material, for example "Black"
Then restore all materials as it was before.
My blueprint works on actors with single material slot
This is hard to me when actors has many materials slots
Please, give me an advice how to solve this task.
asked Sep 18 '18 at 09:00 PM in Blueprint Scripting
Perhaps you should look into material param collection instead.
Think of it as if it was a global variable that can be applied to many materials at once. Rather than replacing all materials and restoring them, you could use a single vector to change their look - turn them black, for example.
answered Sep 18 '18 at 09:22 PM
From the top of my head, I would create a structure, which contain a variable that can reference to an actor, and 1 variable that can contain a list of material template. Then before you switch all mesh material to a single material, go through all the mesh, create a structure for each mesh to store mesh reference and that mesh list of material, store it into an array of structure and put it somewhere that can be access later. Then when you want to restore all the material, just simple go through all the mesh and all the structure again, create and assign correct material to correct mesh.
answered Sep 19 '18 at 07:27 AM
May be there is way collect and replace by every material on level, not by every actor?
answered Sep 19 '18 at 07:00 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here