Change the material of every game object

I’m making a retro styled game, and they all share the same material. If I wanted to make different color themes for my game, is there an easy way to change the material of every object, both present and future to another one selected at run time?

Yep.

lol thanks :stuck_out_tongue:

1 Like

I think you can try to make different materials for every object.

If all of your objects have the same material then there’s a property in the render renderer.sharedMaterial that you can change at run time. Then all of the instances of that material will change too.

Interestingly, when you run your game in the editor this property will permanently change the material, so might need to write some code to change the material back to how it was before.