Should I use Resource.Load to switch between themes?

Hi,

I’m almost finished with a really simple game and a key feature of this game is the ability to change themes.

I’ve done this by using cases for each theme but now that I’m reaching ~10 themes it seems like an awful lot of code (reference all the objects and change their sprites for every one of the 10 cases).

What I’m curious is could I have a dynamic string that changes based on the case (mentioned above) and the replace all the sprites (which would be put in an array) with the sprites at the new path? (I guess all sprites should be named the same in their respective folders)

Would this by any chance be possible? Or is there a simpler way of doing this that I’m not aware of?

Thanks!

Changing the path string and then using Resource.Load would work, wether it’s advisable depends on the frequency of the operation. If it can hapen at will/frequently, then quicker option might be better. Perhaps a Dictionary that has the styles as keys and the Materials, GameObject or whatever as Values? Maybe it can even use generic object types as Values for more flexibility.