Hi,
I'm truly baffled about this, and it probably something very basic I'm overlooking:
I did several sprites, and their color needs to be different based on different terms on the start play. They all use the same script. all also have UIButton.
The weird part is that while the color doesn't change (stays the basic pre-played color which is red), I debugged it and it states that the color is different!
I got this in the console: ( * = the variable part)
"Object No. *1* needs to be green"
"the color of *1* is *RGBA(0.000, 1.000, 0.000, 1.000)*"
- object is STILL red
and same with others.
doing color change while in play mode via key pressing works fine.
this is the relevant code:
UISprite testSP;
<in Start>
testSP = GetComponent<UISprite>();
<in function>
testSP.color = Color.green;
Debug.Log("the color of " + this.name + " is " + this.GetComponent<UISprite>().color);
What am I missing\doing wrong?
Thanks for any help!