Hello everyone!
So I just ran into a weird problem where I cannot assign any colors created from code.
Am I missing something?
There seems to be a problem with the following code:
UI_Highlight[UI_ElementNumber].GetComponent<Image>().color = new Color(255, 255, 255, 100); // DOESN’T WORK (NO ERROR, BUT NOT ASSIGNED)
Debug.Log("SET ALPHA TO: " + UI_Highlight[UI_ElementNumber].GetComponent<Image>().color.a);
yield return new WaitForSeconds(0.5f);
public Color SomeColor; // 255, 255, 255, 100
UI_Highlight[UI_ElementNumber].GetComponent<Image>().color = SomeColor; // WORKS FINE
Debug.Log("<color=blue>##### SET COLOR TO 255, 255, 255, 100 ####</color>");
yield return new WaitForSeconds(2.5f);
Many thanks in advance for any ideas,
Greetings,
Shu