带有用于识别用户手势的 API 的 Manager 类。
GestureRecognizer 仅执行您请求的一组手势之间的最小消歧。例如,如果您仅请求点击,则用户可以在按住手指并持续任意时长,而且当用户释放手指时仍会发生点击。有关可用手势类型的更多详细信息,请参阅 GestureSettings。
只有在调用 StartCapturingGestures 后,GestureRecognizer 才会接收事件。可以再次调用 StopCapturingGestures 来停止事件。这样便可按需激活和停用 GestureRecognizer,例如当用户注视移向并远离对象时。
GestureRecognizer | 创建 GestureRecognizer。 |
Dispose | 处置手势识别器使用的资源。 |
GestureError | 当 Microsoft 手势识别系统出现警告或错误时触发。 |
GestureErrorEvent | 当 GestureRecognizer 发出警告或错误时触发。 |
HoldCanceled | 当 Microsoft 手势识别系统识别到用户已取消长按手势时触发。 |
HoldCanceledEvent | 当用户用手或语音执行取消事件时触发。 |
HoldCompleted | 当 Microsoft 手势识别系统识别到用户已完成长按手势时触发。 |
HoldCompletedEvent | 当用户完成长按手势时触发。 |
HoldStarted | 当 Microsoft 手势识别系统识别到用户已开始长按手势时触发。 |
HoldStartedEvent | 当用户开始长按手势时触发。 |
ManipulationCanceled | 当 Microsoft 手势识别系统识别到用户已取消操作手势时触发。 |
ManipulationCanceledEvent | 操作手势取消时触发。 |
ManipulationCompleted | 当 Microsoft 手势识别系统识别到用户已完成操作手势时触发。 |
ManipulationCompletedEvent | 操作手势完成时触发。 |
ManipulationStarted | 当 Microsoft 手势识别系统识别到用户已开始操作手势时触发。 |
ManipulationStartedEvent | 当交互变为操作手势时触发。 |
ManipulationUpdated | 当 Microsoft 手势识别系统识别到用户已更新操作手势时触发。 |
ManipulationUpdatedEvent | 由于手部移动而更新操作手势时触发。 |
NavigationCanceled | 当 Microsoft 手势识别系统识别到用户已取消导航手势时触发。 |
NavigationCanceledEvent | 导航手势取消时触发。 |
NavigationCompleted | 当 Microsoft 手势识别系统识别到导航手势完成时触发。 |
NavigationCompletedEvent | 导航手势完成时触发。 |
NavigationStarted | 当 Microsoft 手势识别系统识别到用户已开始导航手势时触发。 |
NavigationStartedEvent | 当交互变为导航手势时触发。 |
NavigationUpdated | 当 Microsoft 手势识别系统识别到导航手势已更新时触发。 |
NavigationUpdatedEvent | 由于手部或控制器移动而更新导航手势时触发。 |
RecognitionEnded | 当手势识别完成(由于手势完成或取消)时触发。 |
RecognitionEndedEvent | 当手势识别完成(由于手势完成或取消)时触发。 |
RecognitionStarted | 手势识别开始时触发。 |
RecognitionStartedEvent | 手势识别开始时触发。 |
Tapped | 在 Microsoft 手势识别系统识别到用户已完成点击手势,并且已处理系统语音命令“Select”后触发。对于控制器,在按下主按钮后释放时会触发此事件。 |
TappedEvent | 识别到点击手势时出现。 |
GestureErrorDelegate | 指示出现错误或警告的回调。 |
HoldCanceledEventDelegate | 指示取消事件的回调。 |
HoldCompletedEventDelegate | 指示长按已完成事件的回调。 |
HoldStartedEventDelegate | 指示长按已开始事件的回调。 |
ManipulationCanceledEventDelegate | 指示取消事件的回调。 |
ManipulationCompletedEventDelegate | 指示完成事件的回调。 |
ManipulationStartedEventDelegate | 指示开始事件的回调。 |
ManipulationUpdatedEventDelegate | 指示更新事件的回调。 |
NavigationCanceledEventDelegate | 指示取消事件的回调。 |
NavigationCompletedEventDelegate | 指示完成事件的回调。 |
NavigationStartedEventDelegate | 指示开始事件的回调。 |
NavigationUpdatedEventDelegate | 指示更新事件的回调。 |
RecognitionEndedEventDelegate | 指示手势事件已完成的回调。 |
RecognitionStartedEventDelegate | 指示手势事件已开始的回调。 |
TappedEventDelegate | 指示点击事件的回调。 |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.