ToggleButton

Author: Keli Hlodverrson (freyr)

Description
This script uses a GuiTexture and Unity mouse events to implement a regular toggle button that behaves properly like Mac OS X.

Usage
Attach this script to a GuiTexture object. Add a ButtonPressed function to the object pointed to by the messagee variable to catch when the button has been pressed. (You can change the name of the function by changing the message variable.)

C# - ToggleButton.cs
The ToggleButton is created by extending the Button class. You'll need to have both files present in your project for this snippet to work. ''Note that this script uses features only available in Unity 1.2. Read the comments in Button.cs for more information''