Supported Input

To record & track.

为了通用使用,设置Interaction → Manually Call和Step Start → Manually Call。现在您可以使用脚本的手动调用将步骤绑定到您自己实现的任何类型的输入。参见 Manual Calls

为不同类型的目标提供输入:3D/2D/UI或Any Target(任何地方)。目前支持以下交互和输入类型:

Input
Description
Platform Support
Generated default visual

Manually Call

Called from a script or by a button (see Manual Step Calls)

Any platform

Set manually

Click

Left mouse click or touch

PC & Mobile

UI Pointer + UI Hover + UI Graphic Text

RightClick

Right mouse button click

PC Only

UI Pointer Mouse + UI Hover

DoubleClick

Double left mouse click or double tap

PC & Mobile

UI Pointer Mouse + UI Hover

DoubleRightClick

Double right mouse click

PC Only

UI Pointer Mouse + UI Hover

Hold

Long press of the left mouse button or hold

PC & Mobile

UI Pointer Mouse + UI Hover

RightHold

Long press of the right mouse button

PC Only

UI Pointer Mouse + UI Hover

Drag

Long press of the left mouse button or hold with object movement

PC & Mobile

UI Pointer Mouse + UI Hover

RightDrag

Long press of the right mouse button with object movement

PC Only

UI Pointer Mouse + UI Hover

DragAndDrop*

Drag and drop element

PC & Mobile

UI Pointer + UI Hover + UI Graphic Text

RightDragAndDrop

Drag and drop element via right mouse button

PC Only

UI Pointer + UI Hover + UI Graphic Text

ScrollUp

Scroll up using mouse wheel

PC Only

UI Graphic Text

ScrollDown

Scroll down using mouse wheel

PC Only

UI Graphic Text

KeyCode

Pressing a keyboard key

PC Only

UI Graphic Text

KeyCodeHold

Holding a keyboard key

PC Only

UI Graphic Text

SwipeUp

Swipe up with a mouse or touch

PC & Mobile

UI Graphic Swipe Circle

SwipeDown

Swipe down with a mouse or touch

PC & Mobile

UI Graphic Swipe Circle

SwipeLeft

Swipe left with a mouse or touch

PC & Mobile

UI Graphic Swipe Circle

SwipeRight

Swipe right with a mouse or touch

PC & Mobile

UI Graphic Swipe Circle

Middle Click

Middle mouse button click

PC Only

UI Pointer Mouse + UI Hover

Middle Hold

Middle mouse button hold

PC Only

UI Pointer Mouse + UI Hover

Pinch In

Pinch in gesture for zooming out

Mobile Only

UI Graphic Text

Pinch Out

Pinch out gesture for zooming in

Mobile Only

UI Graphic Text

Pinch Rotate

Gesture for rotating

Mobile Only

UI Graphic Text

  • 对于Drag and Drop交互,可能有两种情况:

Project logic
In recording
In playback

如果在移动过程中,被持有的对象对射线检测变为非阻挡状态,并且可以识别其后面的对象。

初始对象和最终对象都被识别。该交互被视为DragAndDrop。

玩家需要将一个对象拖拽到另一个对象上。

如果在移动过程中,被持有的对象对射线检测不变为透明状态,并且无法识别其后面的对象。

只识别初始对象 - 即它被移动和释放。该交互被视为Drag;但是,可以手动设置为Drag & Drop。

玩家需要将一个对象拖拽到任何地方并释放它(拖拽在移动阶段就已执行,甚至无需释放)。

Old and New Input System

默认情况下,系统设置为旧版Input Manager。要完全切换到新版,请按以下步骤操作:

  • 打开Edit → Project Settings → Player → Configuration,如果尚未选择,将Active Input Handling设置为New。

  • 如果尚未安装,请安装Input System Unity包。

  • 如果尚未使用,将EventSystem设置为InputSystemUIInputModule。

  • 在InputController组件中将inputSystemType设置为New。

Last updated