UI---------EventSystem


创建uGUI控件后,Unity会同时创建一个叫EventSystem的GameObject,用于控制各类事件。可以看到Unity自带了两个Input Module,一个用于响应标准输入,一个用于响应触摸操作。Input Module封装了对Input模块的调用,根据用户操作触发各Event Trigger。理论上我们可以编写自己的Input Module,用来封装各种外部设备的输入,只要加入Event System所在的GameObject就行。

Event System组件则统一管理多个Input Module和各种Raycaster。它每一帧调用多个Input Module处理用户操作,也负责调用多个Raycaster用于获取用户点击的uGUI控件以及2D和3D物体。

EventSystem:

EventSystem 是一种将基于输入的事件发送到应用程序中的对象,无论是键盘、 鼠标、 触摸或自定义输入。

First Selected:

Send Navigation Events:

Drag Threshold:

Standalone Input Module:

input module用于鼠标、键盘和控制器。该模块被配置查看 InputManager,发送事件是基于输入Input manager管理器是何种状态。

Horizontal Axis:水平输入设备

Vertical Axis: 垂直输入设备

Submit Button: 提交按钮事件

Cancel Button:取消按钮事件

Input Action Per Sceond:允许最大每秒事件数

Allow Activeation On Mob..:?

Touch Input Module:

Allow Activation On Sta...:

原文地址:https://www.cnblogs.com/android-blogs/p/6423764.html