- Home /
In game themes
I would like to apply themes system in my game so player can choose cartoon theme and all objects will change their graphics (sprites) to the specific type. Also he can choose realistic theme and all game graphics will change accordingly. So game concept will remain same only graphics will change.
What is the best way to achieve this? Should I create folder for every theme graphics and when theme is changed I will change some string path maybe as static attribute in some class and then all gameobjects will load sprites from that folder accordingly. Or is there some better, more effective solution?
Thanks.
Answer by Sergio7888 · Nov 12, 2016 at 08:50 PM
You will need a class to manage the themes and set the current theme, you need create a ScriptableObject for each theme to hold their data, any component that will use the theme need in a Update method or a message system a code to know when the theme changed to change its appearance.
Answer by $$anonymous$$ · Oct 03, 2018 at 12:10 AM
@kristianhargas We developed a solution that does exactly what you want.
The implementation lets you edit themes, with full freedom across your UIs, and saves the data to ScriptableObjects, as @Sergio7888 mentioned. The solution provides a simple API for swapping out themes at runtime as well!
You can learn more about it here: https://forum.unity.com/threads/global-theme-styler-customizer.532257/
Your answer
Follow this Question
Related Questions
Can I change the color of the script editor? 1 Answer
Should I use Resource.Load to switch between themes? 1 Answer
Best way to include multiple game themes into the game each with different game objects? 1 Answer
"Save Scene as" window not showing up 0 Answers
How to invert viewport blacks and whites 0 Answers