UGUI的事件系统EventSystem

添加UGUI物体后,自动创建EventSystem,它由EventSystem,StandaloneInputModule,{TouchInputModule}个组件组成。TouchInputModele的handle已经集成在StandaloneInputModule了。

EventSystem组件主要用来处理输入,射线投影和发送事件。InputModule继承自BaseInputModule,主要当然是发送输入事件到具体对象。

总的来说,EventSystem负责管理,BaseInputModule负责输入,BaseRaycaster负责确定目标对象,目标对象负责接受事件并处理,然后一个完整的事件系统就有了。


首页 我的博客
粤ICP备17103704号