IvanMurzak / Unity-Theme

Create palettes of colors and components for change specific color on a specific visual element. Very useful to UI.
MIT License
99 stars 6 forks source link

Color still changes while component is disbaled #5

Closed iiidefektiii closed 1 year ago

iiidefektiii commented 1 year ago

I have to toggle between two color properties. Since I can seem to get it to change colors at runtime with the same component I created two binders one is an active binder and one is a inactive binder for spriterenderers. If I create a prefab and add the components but turn them off they still change the color of the spriterenderer when adding the prefab to my scene even tho they are disabled it still runs on awake.

IvanMurzak commented 1 year ago

It sounds like you need to have two different Themes (color palettes), and to switch the Themes in runtime by using this sample

Theme.Instance.CurrentThemeName = "Dark";

just use a single ColorBinder per target component. Unity-Theme-Palettes