Example #1
0
 void Start()
 {
     dragevent             = gameObject.AddComponent <DragGestureEvent>();
     dragevent.ActionState = HandsGestureManager.HandGestureState.ShiftDrag;
     dragevent.DragStartActionEvent.AddListener(GestureStart);
     dragevent.DragUpdateActionEvent.AddListener(GestureUpdate);
 }
        void Start()
        {
            dragevent = gameObject.AddComponent <DragGestureEvent>();
#if !UNITY_2017_2_OR_NEWER
            dragevent.ActionState = HandsGestureManager.HandGestureState.Drag;
#else
            if (HolographicSettings.IsDisplayOpaque)
            {
                dragevent.HandState = HandControllerManager.HandControllerState.SelectDrag;
            }
            else
            {
                dragevent.ActionState = HandsGestureManager.HandGestureState.Drag;
            }
#endif
            dragevent.DragStartActionEvent.AddListener(GestureStart);
            dragevent.DragUpdateActionEvent.AddListener(GestureUpdate);
        }