FadeIn

Author: Alejandro Gonzalez (zerofractal)

Description
This is a script that allows you to show/hide a GUIText or GUITexture object when pressing a button.

It smoothly fades in and out the map based on the fade duration determined by the user. The default button is set to "Jump" You can easily edit the name of the button from the editor, just make sure you have created a button axis with that name.

The script also allows the image to stay visible for some time at the beginning of the level. If you want it to start invisible, simply edit the object's alpha value to 0 in the color setting.

Usage
Place this script on a GameObject with a GUIText and/or GUITexture component. Choose the appropriate fade in speed and button name.