Hello guys.
I’ve written the follwoing code:
_alphaValue = Mathf.Lerp(_alphaValue, 255, Time.deltaTime * 2);
fadeScreen.color = new Color(0, 0, 0, _alphaValue);
if(fadeScreen.color.a >= 245)
Application.LoadLevel(1);
where _alphaValue is float, fadeScreen is type of RawImage and its value is assigned in the inspector. The problem is, that screen fades immediately. However, fadeScreen.color.a is more than 245 in approximately 2 seconds. But in the inspector I can see it has value 255 after first frame.
Anyone knows where could be the problem?
Thanks for any help.