FadeObjectInOut

Author: Hayden Scott-Baron (Dock)

Description
This allows you to easily fade an object and its children. If an object is already partially faded it will continue from there. If you choose a different speed, it will use the new speed.

It's especially useful for GUI style objects, but can be used on 3D objects in the scene as well.

Updated
Updated 7th March 2013 with the option of pausing before the fade occurs, and a bunch of fixes to 'Fade In On Start'.

Usage
Place this script on the gameobject you wish to fade, and call 'FadeIn' or 'FadeOut'. Adjust fading time with 'FadeIn(4.0f)', or by adjusting the public time variable.

Technical Discussion
This requires objects to have materials that allow for alpha transparency.