根据设计,该模块与控制器/鼠标输入具有相同的功能。响应输入时会发送按钮按压、拖拽以及类似事件。
当鼠标/输入设备移动时,该模块将指针事件发送到组件,并使用图形射线投射器 (Graphics Raycaster)和物理射线投射器 (Physics Raycaster) 来计算给定指针设备当前指向的元素。您可以配置这些射线投射器来检测或忽略场景的某些部分,从而满足您的要求。
该模块会发送 Move 事件和 Submit/Cancel 事件来响应通过 Input 窗口跟踪的输入。对于键盘和控制器输入均是如此。可在模块的检视面板中配置跟踪的轴和键。
属性: | 功能: |
---|---|
Horizontal Axis | 为水平轴按钮输入所需的管理器名称。 |
Vertical Axis | 为垂直轴输入所需的管理器名称。 |
Submit Button | 为 Submit 按钮输入所需的管理器名称。 |
Cancel Button | 为 Cancel 按钮输入所需的管理器名称。 |
Input Actions Per Second | 每秒允许的键盘/控制器输入数量。 |
Repeat Delay | 每秒输入操作重复率生效前的延迟秒数。 |
Force Module Active | 启用此属性可强制该__独立输入模块 (Standalone Input Module)__ 处于活动状态。 |
该模块:
该模块的流程如下
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.