Horje
fade image out unity Code Example
fade image out unity
IEnumerator FadeImage(bool fadeAway)
{
    // fade from opaque to transparent
    if (fadeAway)
    {
        // loop over 1 second backwards
        for (float i = 1; i >= 0; i -= Time.deltaTime)
        {
            // set color with i as alpha
            img.color = new Color(1, 1, 1, i);
            yield return null;
        }
    }
    // fade from transparent to opaque
    else
    {
        // loop over 1 second
        for (float i = 0; i <= 1; i += Time.deltaTime)
        {
            // set color with i as alpha
            img.color = new Color(1, 1, 1, i);
            yield return null;
        }
    }
}




Csharp

Related
c# compare months Code Example c# compare months Code Example
c# linq sorting sequential guids Code Example c# linq sorting sequential guids Code Example
order by and then by c# Code Example order by and then by c# Code Example
Arduino UNO Code Example Arduino UNO Code Example
attribute decorator to require email format of string c# Code Example attribute decorator to require email format of string c# Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11