Search Unity

CrossFadeAlpha - can someone explain this peculiarity?

Discussion in 'UGUI & TextMesh Pro' started by Mystic_Quest, Apr 4, 2019.

  1. Mystic_Quest

    Mystic_Quest

    Joined:
    Feb 22, 2016
    Posts:
    47
    Had the same problem with Unity 5 as well. Had submitted a bug back then, but tbh I am not sure if it is a bug or if I am missing something. Now using 2018.3.

    The CrossFadeAlpha function refused to work for my text. After a few hours of headache testing various different things and googling to no avail I managed to make it work by setting my alpha to a minimum value (0.01), instead of zero in the inspector and it faded in the text without issue. It just won't work with zero.

    Also, according to the API it fades from 0 to 1 but it would only work from 1-255 for me, no matter the RGB color setting in the inspector of the text component.

    Anyone knows why this happens?