For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

MouseHover

Waits for the mouse to hover over the object

PC Only

Set manually

ScreenCenterHover

Waits for the object to be aimed at by the center of the screen

PC & Mobile

Set manually

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。

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

Check Object

检查对象验证可以通过以下方式执行:

  • Check Object = By Tag. 将比较标签指定为字符串。这样上面选择的触发器将仅对具有该标签的对象激活。

  • Check Object = By Layer. 将比较层级指定为整数索引。这样上面选择的触发器将仅对具有该层级的对象激活。

  • Check Object = By Type. 指定比较类型:3D/2D/UI。这样上面选择的触发器将仅对具有该类型的对象激活。

  • Check Object = By Name. 指定比较名称。这样上面选择的触发器将仅对名称包含该部分的对象激活。

  • Check Object = By Component. 指定比较组件:从项目中创建的自定义组件列表中选择(非内置组件,而是用户定义的组件)。这样上面选择的触发器将仅对具有该组件的对象激活。

  • Check Object = By ComponentValue. 指定比较组件及其值以与目标值进行比较。这样触发器将仅对具有该组件和所需值的对象激活。可以从项目中手动创建的脚本中进行选择. 支持的变量类型:Bool、Int、Float、String、Enum 可用的比较运算符:等于 (==)、不等于 (!=)、大于 (>)、小于 (<)、大于或等于 (>=)、小于或等于 (<=)、包含 (string.Contains)、开头为 (string.StartsWith)、结尾为 (string.EndsWith)。

Configuration that triggers the visual only when hovering over objects with IsHexAvailable = true in the ValueHandler component on the object.

Old and New Input System

When the TutorialSystem prefab is added to the scene, the Input Controller automatically adjusts to match the Input System in the project, edits or removes the child backup EventSystem if it already exists in the scene. However, manual correction may still be required.

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

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

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

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

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

Last updated