Game Development Reference
In-Depth Information
The UnityEngine.UI-Editor project only contains linked files from
the UnityEngine.UI project, meaning they are the same files. If you
add more classes to the UI project you will also need to create a new
Linked file in this project.
Navigating round the innards of the UnityEngine.UI project you will find the
following folders:
Subject to change, it is an open source project after all.
EventSystem : This contains core code and types to do with events,
the Event System , and communication:
° EventData : This contains structures and classes for event information.
° InputModules : These contain the base input managers and delegate
inputs from the Unity input event to the Event System.
° Raycasters : This contains the base raycast modules that interrogate
the scene based on the inputs. Note that it doesn't include the
GraphicsRayaster , as this is located in the UI Core folder.
UI : This is a structured folder for UI specific code. Code is located within
the subfolders.
Animation : This contains animation helper files.
Core : At the moment, this contains everything else. So it includes all the
components, types, modifiers, and utilities.
If you add a new type or class to the UnityEngine.UI project, be sure
to also link that file in the UnityEngine.UI-Editor project, or it won't
compile. The UnityEngine.UI-Editor project is essential for the inner
workings of the editor and the main UnityEngine.UI project is what
is deployed to the players.
There is certainly a lot of code to browse and get used to, so when you start I
recommend you take your time walking through each component and understand
how it has been implemented. (All the previous sections in this chapter were put
together after spending a lot of time with the code.)
 
Search WWH ::




Custom Search