Game Development Reference
In-Depth Information
As you can see, practically everything the
Button
implements comes from the
Selectable
control (see the following screenshot) or through direct implementation
of the
EventSystem
interfaces. The main parts of the code (commented out, else this
would take several pages) handle clicking on the
Button
and what should happen if
the
Button
fires a
Submit
(finish) event for a form (granted, this is more for keyboard
rather than mouse or touch).
When we look at the
Button
control in the
Hierarchy
and
Inspector
window, we see
the following:
This shows the full implemented control in the editor, so let's look at these
new components.