(19th) unity4.6 learn Ugui Chinese documents ------- interactive-EventSystem, ugui-eventsystem

Source: Internet
Author: User

(19th) unity4.6 learn Ugui Chinese documents ------- interactive-EventSystem, ugui-eventsystem

Hello everyone, I am Sun Guangdong. Reprinted please indicate the source: http://write.blog.csdn.net/postedit/38922399

More comprehensive content please see my game pretty cool address: http://www.unitymanual.com/forum.php? Mod = guide & view = my


5. EventSystem


EventSystem is an object that sends input-based events to an application, whether it is a keyboard, mouse, touch, or custom input. EventSystem is composed of several components that send events.


Overview


When you add the EventSystem component to a game object, you will find that it does not expose many features, because EventSystem itself is designed as a manager and facilitator (Management and host) communication between EventSystem modules.


The main function of EventSystem is as follows:


• Manage which GameObject is consideredselected


• Manage which InputModule is in use


• Manage Raycasting (if required)


• Updating all InputModules as required


• Manage selected game objects


• Manage InputModule in use


• Manages Raycasting (if needed)


• Update all InputModules required


 


Input Modules


What is the main logic of the input modules represented by EventSystem? They are used:


• Handling Input


• Managing event state


• Sending events to scene objects.


• Process Input


• Manage the event status


• Send events to scene objects.


At the same time, only one InputModule can be active in EventSystem, and they must be components on the same game object as the EventSystem component.


 


Raycasters


Raycasters is used to send and determine the top of the pointer. It is common for InputModules to use Raycasters. In scenario configuration, it is used to calculate that the pointing device is over.


In three cases, Raycasters exists by default:


• GraphicRaycaster-Used for UI elements


• 2 DPhysicsRaycaster-Used for 2D physicselements


• 3DPhysicsRaycaster-Used for 3D physics elements


• GraphicRaycaster-used for UI elements


• 2DPhysicsRaycaster-used for 2D physical elements


• 3DPhysicsRaycaster-used for 3D physical elements




Zookeeper


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.