Hello, I’m using Unity UI Image to display a preview of my level.
I change it’s color from script to change it’s color alpha with two colors I have set in the inspector.
I have done this a lot and it’s should be working.
The code is very easy :
public Image Preview;
public Color ValidColor;
public Color InvalidColor;
...
Preview.color = m_Playable ? ValidColor : InvalidColor;
Even if I change the color of the Image during run time through the inspector, nothing changes on the game view.
This bug happen only on this particular Image class, I’ve never seen that before.
Hey thank you @motorious , this bug drove me crazy I searched a fix for hours.
Is there a way to have notification on bug tracker status update ?
Have a nice day
Thank you for this response - this behaviour suddently was broken in my game and I could not figure it out. I unfortunately do not have time for unity to figure out how to fix this, so instead I changed my Image Type to Filled (fill amount 1) instead of Simple and the problem was solved.
hey, I am using 2019.1.9f1 of unity still I am facing these issue.
basically I need to change the colors of the scoreboard in my scene, I can change colors for 1 scoreboard (which is basically is an image) but not for the other one, which is exactly the same as the previous.
Maybe this will help someone else in future. I wanted to change sprite color from code. found that using Color had no effect but Color32 worked great.
Hope this helps.
Thanks. Sounds obvious but I think I just naturally assumed that the Color property set via mono behavior would be the same default alpha value set by unity. I’m ashamed to admit I have spent way too much time on this lol