Hi,
I'm was trying to change the state colors of a button with several UIButtonColor components via code, before it received any input event. Unfortunately this didn't work, unless I hovered over (or clicked) the button at least once before the change.
I fixed this by adding this to UIButtonColor:
/// <summary>
/// Init the visual state.
/// </summary>
protected virtual void InitState() {
TweenColor.Begin(tweenTarget, duration, mColor);
}
And I called the method in OnInit().
Maybe I was missing something, otherwise it would be nice if you could add something like this to your script. (Don't like messing with your code, it such a pain to merge changes everytime an update arrives
)
Cheers