How to change UI Theme

Hi everyone, I did research on this subject but could not get a clear result. Either someone hasn’t posted an example on the internet or I couldn’t research the right thing.

The problem is that I want to change the UI theme in my game from the settings. I currently have two themes; Traditional and Dark. The game will start with Dark UI when starting, but I want you to be able to switch to the Traditional UI from the settings while in the game. Since it’s a text-based game, there are a lot of panels or images.

Is there a tool that I can use to handle this kind of mechanics or do you have any suggestions?

Example images:
DARK UI

TRADITIONAL UI

Hello! Have you considered using UI Toolkit to make your UI? It uses style sheets so it’s much easier to switch themes easily :slight_smile:

No, I didn’t, I proceeded by creating an Image directly. Now I looked at it and said, “How have I not used this before?” :') But there is a problem, how long will it take to transfer the whole project to this? Because I’m planning to release this game soon, will it take me too long to change the entire UI? Is there any other way? I wish I had learned this before. :slight_smile:

Well changing themes in uGUI (the main UI system currently) is not really a thing you get out of the box with Unity, you’d have to change assets/colors in many places manually. With UI Toolkit (available for Runtime UI since 2021.3) you do it through style sheets so the effort would be different - can’t say if greater os less than though! Depends on many factors.
I don’t know your UI design, of course, but the ones you showed here would be pretty simple to replicate with UI Toolkit. I recommend exploring it a bit through using the UI Builder (Window > UI Toolkit > UI Builder) so you can have an idea!

1 Like

I will try this anyway, as there is no other solution for the problem I am looking for, other than doing it manually with my own hands. Thank you very much for your answer.

1 Like