Can the smart people tell me why i cant use this code inside a PM Action?
Obviously i am not including the public class.. But just trying to insert that basic reference to the TapGesture Recognizer?
I am sure this is a basic scripting thing but i am not a scripter so i dont get it.
Q
using UnityEngine;
public class MyTapHandler : MonoBehaviour
{
// reference to our tap gesture recognizer object
public TapGestureRecognizer tapRecognizer;
void Start()
{
// register to the tap recognizer's OnTap event
tapRecognizer.OnTap += tapRecognizer_OnTap;
}
// our tap event handler method
void tapRecognizer_OnTap( TapGestureRecognizer source )
{
Debug.Log( "TAP detected at " + source.Position );
}
}