Closed codyrchildress closed 1 year ago
@codyrchildress hi. Thank you! Yes, it works in Edit Time and in Play Time (runtime). You can create multiple different UI styles in the settings of the game. Or use for Day/Night cycles. Any approach works. All the Binders are subscribed to the color change event.
Thank you for the reply. How would I raise this color change event, and how do I specify the theme I want to switch to?
@codyrchildress You can do that using C# API of the package.
// Link ThemeDatabase,
// path to the file in your project: `/Assets/Resources/Unity-Theme Database.asset`
[SerializedField] ThemeDatabase themeDatabase;
// change the current theme to a new theme from existed themes list
themeDatabase.CurrentThemeIndex = 1;
Is it possible to get the list of themes from another script and set it instead of by name or index? Example. I create a ThemeManager script to call it by name but would be awesome if I could get the list of available themes and set it within in my script. this way each scene can have its own theme set.
I feel like it may be doable but you cannot access 'themes' because it is private.
Hi there,
Thank you for sharing this wonderful asset. Is it possible to change the theme at runtime? I am hoping to use this to implement a day/night mode on my game.
Cheers, Cody