Hi!
I have created a widget that holds 2 panels inside it. Each panel has its own sprites and buttons!
What I want to do is, use these panels in many cases and change only the colors of sprites and buttons.
So I created a script that changes the color of all buttons and sprites. Now the problem is that when I change the colors of buttons something goes wrong and it does not work properly!
I change the color of a button like so...
infoBackBtn.defaultColor = blue1;
infoBackBtn.hover = blue2;
infoBackBtn.pressed = blue3;
infoBackBtn.UpdateColor(true,true);
blue1,blu2,blu3 are colors of mine! ex. private Color blue1 = new Color(0.3f,0.3f,0.8f,1f);
While the game running Iwatch a button at the inspector and I see that hover color and onPressed color change to what I told it to, though the defaultColor remains white, also the tweens are not working when I hover the button or when I press the button, It's color remains white.
While the game starts the main widget is disabled(from editor). when I click an object, it enables the widget and shows the first panel.
First panel's buttons work ok. The problem is at the other panel (which comes after I click a button from the first panel).
Also I tested having the main widget enabled(from editor) and showing the panel (that has the problem) before the game starts, and when I click to change the color then it works ok. But I don't want to have the main widget enabled from the beggining!
Thank you!