Version: 2019.4
LanguageEnglish
  • C#

GestureRecognizer

class in UnityEngine.XR.WSA.Input

/

Implemented in:UnityEngine.VRModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Manager class with API for recognizing user gestures.

GestureRecognizer performs only the minimal disambiguation between the set of gestures that you request. For example, if you request just Tap, the user may hold their finger down as long as they like and a Tap will still occur when the user releases their finger. For more details on the types of gestures available see GestureSettings.

GestureRecognizers will only receive events after StartCapturingGestures is called. StopCapturingGestures can be called again to stop events. This allows for GestureRecognizer to be activated and deactivated on demand such as when a users gaze moves over and away from an object.

Constructors

GestureRecognizerCreate a GestureRecognizer.

Public Methods

DisposeDisposes the resources used by gesture recognizer.

Events

GestureErrorFires when Microsoft's gesture-recognition system encounters a warning or error.
GestureErrorEventFired when a warning or error is emitted by the GestureRecognizer.
HoldCanceledFires when Microsoft's gesture-recognition system recognizers that a user has canceled a hold gesture.
HoldCanceledEventFired when the user does a cancel event either using their hands or in speech.
HoldCompletedFires when Microsoft's gesture-recognition system recognizers that a user has completed a hold gesture.
HoldCompletedEventFired when users complete a hold gesture.
HoldStartedFires when Microsoft's gesture-recognition system recognizes that a user has started a hold gesture.
HoldStartedEventFired when users start a hold gesture.
ManipulationCanceledFires when Microsoft's gesture-recognition system recognizes that a user has canceled a manipulation gesture.
ManipulationCanceledEventFires when a Manipulation gesture is canceled.
ManipulationCompletedFires when Microsoft's gesture-recognition system recognizes that a user has completed a manipulation gesture.
ManipulationCompletedEventFires when a Manipulation gesture is completed.
ManipulationStartedFires when Microsoft's gesture-recognition system recognizes that a user has started a manipulation gesture.
ManipulationStartedEventFires when an interaction becomes a Manipulation gesture.
ManipulationUpdatedFires when Microsoft's gesture-recognition system recognizes that a user has updated a manipulation gesture.
ManipulationUpdatedEventFires when a Manipulation gesture is updated due to hand movement.
NavigationCanceledFires when Microsoft's gesture-recognition system recognizes that a user has canceled a navigation gesture.
NavigationCanceledEventFires when a Navigation gesture is canceled.
NavigationCompletedFires when Microsoft's gesture-recognition system recognizes that a navigation gesture completes.
NavigationCompletedEventFires when a Navigation gesture is completed.
NavigationStartedFires when Microsoft's gesture-recognition system recognizes that a user has started a navigation gesture.
NavigationStartedEventFires when an interaction becomes a Navigation gesture.
NavigationUpdatedFires when Microsoft's gesture-recognition system recognizes that navigation gesture has updated.
NavigationUpdatedEventFires when a Navigation gesture is updated due to hand or controller movement.
RecognitionEndedFires when recognition of gestures is done, either due to completion of a gesture or cancellation.
RecognitionEndedEventFires when recognition of gestures is done, either due to completion of a gesture or cancellation.
RecognitionStartedFires when recognition of gestures begins.
RecognitionStartedEventFires when recognition of gestures begins.
TappedFires when Microsoft's gesture-recognition system recognizes that a user has done a tap gesture and after the system voice command "Select" has been processed. For controllers, this event fires when the primary button is released after it was pressed.
TappedEventOccurs when a Tap gesture is recognized.

Delegates

GestureErrorDelegateCallback indicating an error or warning occurred.
HoldCanceledEventDelegateCallback indicating a cancel event.
HoldCompletedEventDelegateCallback indicating a hold completed event.
HoldStartedEventDelegateCallback indicating a hold started event.
ManipulationCanceledEventDelegateCallback indicating a cancel event.
ManipulationCompletedEventDelegateCallback indicating a completed event.
ManipulationStartedEventDelegateCallback indicating a started event.
ManipulationUpdatedEventDelegateCallback indicating a updated event.
NavigationCanceledEventDelegateCallback indicating a cancel event.
NavigationCompletedEventDelegateCallback indicating a completed event.
NavigationStartedEventDelegateCallback indicating a started event.
NavigationUpdatedEventDelegateCallback indicating a update event.
RecognitionEndedEventDelegateCallback indicating the gesture event has completed.
RecognitionStartedEventDelegateCallback indicating the gesture event has started.
TappedEventDelegateCallback indicating a tap event.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961