void Start() { arGestureInteractor = GetComponent <ARGestureInteractor>(); arGestureInteractor.DragGestureRecognizer.onGestureStarted += DragGestureRecognizerStarted; arGestureInteractor.PinchGestureRecognizer.onGestureStarted += PinchGestureRecognizerStarted; arGestureInteractor.TwoFingerDragGestureRecognizer.onGestureStarted += TwoFingerDragGestureRecognizerStarted; }
// Start is called before the first frame update void Start() { arGestureInteractor = GetComponent <ARGestureInteractor>(); arGestureInteractor.TapGestureRecognizer.onGestureStarted += OnTapRecognized; arGestureInteractor.DragGestureRecognizer.onGestureStarted += OnDragRecognized; }
private void Start() { _arGestureInteractor = GetComponent <ARGestureInteractor>(); _arGestureInteractor.DragGestureRecognizer.onGestureStarted += DragGestureRecognizerStarted; _arGestureInteractor.PinchGestureRecognizer.onGestureStarted += PinchGestureRecognizerStarted; _arGestureInteractor.TwoFingerDragGestureRecognizer.onGestureStarted += TwoFingerDragGestureRecognizerStarted; // _arGestureInteractor.TapGestureRecognizer; // _arGestureInteractor.TwistGestureRecognizer; }
public static void RegisterGestureLoggingEvents(ARGestureInteractor gestureInteractor) { gestureInteractor.TapGestureRecognizer.onGestureStarted += LogTapGesture; gestureInteractor.DragGestureRecognizer.onGestureStarted += LogDragGesture; gestureInteractor.TwoFingerDragGestureRecognizer.onGestureStarted += LogTwoFingerDragGesture; gestureInteractor.PinchGestureRecognizer.onGestureStarted += LogPinchGesture; gestureInteractor.TwistGestureRecognizer.onGestureStarted += LogTwistGesture; }
static bool UpdateGestureInteractor() { if (s_GestureInteractor == null) { var gestureInteractors = FindObjectsOfType <ARGestureInteractor>(); if (gestureInteractors.Length == 0) { Debug.LogWarning("No gesture interactor in scene."); return(false); } else if (gestureInteractors.Length > 1) { Debug.LogWarning("Multiple gesture interactors in scene. Ensure there is only one"); } s_GestureInteractor = gestureInteractors[0]; } return(true); }
// Start is called before the first frame update void Start() { arGestureInteractor = Camera.main.GetComponent <ARGestureInteractor>(); arGestureInteractor.DragGestureRecognizer.onGestureStarted += OnDragStart; }