(I would have posted this as a question but it wont let me saying i need a tag and it wont let me enter a tag, I am glad that feature works so well…)
The current code i have is set up to change a sprite on a game object in addition it is also is suppose to change a GUI element to allow the player to have some feedback on what color is changing to. I used this on another sprite that works fine (The sprite changes color when i have it selected) however it is no longer allowing me to change the sprite color or the GUI color in any way except by specifically stating a color such as Color.Red.
It is allowing me to change the Alpha just not the colors. It is incredibly frustrating because the code is fine it just wont work!
// This Works
transform.Find(“SpriteOne”).GetComponent().color = new Color (50,50,1,1);
// This Does NOT Work!!
transform.Find (“SpriteTwo”).GetComponent ().color = new Color (50,50,1,1);
// This Works
transform.Find (“SpriteTwo”).GetComponent ().color = Color.Red;
// This Works
GUI.color = Color.Red;
// This Does NOT Work!!
GUI.color = new Color (50,50,1,1);