Blog

Screen Fade

A simple, static solution for fading the screen in Unity. This solution fires off three events during its operation: OnFadeBegin, OnFadeUpdate and OnFadeEnd and you can easily hook onto these to respond to the status of the fade. There’s also a hand property called IsFadingUp which is convenient for checking when a fade is complete to execute some clean up logic if you are fading scenes and then easily fire off a fade down. I’ve also included a few handy overloads in the public interface to add flexibility so take a look at the comments when you are using this solution. The example project below is included in the package and, as always, let me know if there are any problems or suggestions.

Download

10 Comments

  1. Stefan Hollekamp
    December 12, 2012

    wow
    just what i’m looking for 🙂
    kudos & thanxx

  2. thylaxene
    January 22, 2013

    thanks again! 😉

  3. NigeDemo
    February 7, 2013

    Thank you so much for this – found it right at the end of a very frustrating day – kudos indeed 🙂

  4. July 24, 2013

    This will be super useful – I’m using Unity in a planetarium dome – but am I the only one who finds it odd that in the above example I am clicking a button labeled “Fade Up” to fade down, and vice versa?

    • July 24, 2013

      The descriptions for fading in the example are more for the fade object itself. I agree its a tad odd but when you are in the moment of the solution…

  5. DvD
    October 26, 2013

    superb..tutorial,dude..keep it up.. and at last thanks a lot..

  6. Mike
    May 27, 2014

    Any quick start instructions? Maybe I’m missing the tutorial but I only see ScreenFade.cs

    • May 28, 2014

      Thanks for alerting me of this. I uploaded a new version that has the example scene back in it.

  7. metroidsnes
    September 23, 2014

    Thanks!