Submissions by wespaugh tagged alpha-unity-image-fading

tl;dr I can fade images in Unity now. Woo

I'm still learning Unity, slowly. I think I've exhausted the Tutorial resources, for now. To start really getting my hands dirty, I'm working on a dating simulator. At first I thought it would be a way to prove I knew how to change scenes, display sprites, and do simple effects like transforms and sprite indexing. Now that I know that I see that the real challenge is going to be creating a content creation workflow.

But I'm getting ahead of myself. Today I learned how to do a simple fade. Turns out there's three ways; calculating alpha values based on delta time and setting the alpha value manually, using Mathf.lerp to tween values automatically and still setting alpha manually, and using the CrossFadeAlpha function to do exactly what I need. Guess which method was hardest to find?

Also discovered that Unity tends to deal in milliseconds, or at least does for this function.

IMG_3076.MOV453kb
4 downloads