Refactor of original UI Button control, can now add Press/Release and Hold events to any Selectable control
1 Overview
3 Methods
4 Usage
6 See also
The Selectable Extension adds three events to any Selectable component for Press, Release and Hold.
The properties of the Box Slider control are as follows:
Property | Description |
---|---|
On Button Press (event) | The Event fired when the selectable is clicked |
On Button Release (event) | The Event fired when the selectable is released from a click |
On Button Held (event) | The Event fired when the selectable is being held (mouse / touch down) |
Simply add the default Selectable Extension to a Rect Transform using “UI / Extensions / UI Selectable Extension” in the “Component” menu.
It is also available as a Game Component menu in “UI / Extensions / UI Selectable Extension”.
Click to play
Shows adding the Selectable Extension to a Non Drawing Graphic GameObject
Sourced from - http://forum.unity3d.com/threads/scripts-useful-4-6-scripts-collection.264161/page-2#post-1796783