Download

Storing and Swapping large sets of materials

What is the best way of getting the individual materials of a large group of actors in a level - storing them. Applying a new material then at a later time re-verting all the original materials back to the actors?

I am assuming I might need to get a reference for all the actors and forEach loop each one to store each material in an array or something - reapply the new material then later, get all the materials from the arrays and reapply them.

Problem is I have a mix of actor types in the level - some are BP’s with sub componants all with their own materials some are static meshes etc.

Trying to figure out if there is a better solution to flipping the materials like this.

Have you thought about using the Variant Manager for that ? This will of course only work if the Material sets are not dynamic.