Fade screen in and out

Hi guys! Anyone know of a way to have the screen fade to and from black when the level gets loaded?

Keep in mind that I have GUI elements (OnGUI buttons) on screen as well, and I want them to fade with the screen. I’m sure it possible.

I’m playing with Unity’s GUI and I must say, it’s flexible from what I can tell, but pretty difficult to use without constantly tweaking it. I’m amazed UT hasn’t struck a deal with Jeremy to integrate GUIX into Unity GUI. Because GUIX is exactly what Unity’s GUI system needs. :slight_smile:

Look at the script in the wiki:
http://unifycommunity.com/wiki/index.php?title=FadeInOut
(A simple JavaScript version from PsychicParrot and an improved Boo version from me that you can use from JavaScript if you put it into the Stnadard Assets folder).

To also fade your GUI elements you need to set drawDepht/guiDepth to be above all your controls.

Thanks Adrian (and you too Psychic Parrot)! Script works like a charm! :smile:

The Link is broken.

Here’s one from Unity: