Hey ArenMook,
Thanks for the info.
Whilst I was waiting I'd created something using 'Time.fixedTime'.
Is this similar to your suggestion? Perhaps the OnPress(true/false) is more efficient?
Here's the code I created :
#pragma strict
var timeCurrent : float;
var timeAtButtonDown : float ;
var timeAtButtonUp : float ;
var timeButtonHeld : float = 0 ;
var draggable : boolean = false;
function Start () {
}
function Update () {
timeCurrent = Time.fixedTime;
}
function OnMouseDown()
{
timeAtButtonDown = timeCurrent;
Debug.Log ("Time button pressed" + timeAtButtonDown);
}
function OnMouseUp()
{
timeAtButtonUp = timeCurrent;
Debug.Log ("Time button released" + timeAtButtonUp);
timeButtonHeld = (timeAtButtonUp - timeAtButtonDown);
Debug.Log ("TimeButtonHeld = " + timeButtonHeld);
if (timeButtonHeld > 2)
{
draggable = true;
Debug.Log ("Yeah, you held the mouse for longer than 2 secs!!");
}
}