Book Image

Learning NGUI for Unity

By : Charles Bernardoff (EURO)
Book Image

Learning NGUI for Unity

By: Charles Bernardoff (EURO)

Overview of this book

Table of Contents (17 chapters)
Learning NGUI for Unity
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Summary


In this chapter, we learned how to take advantage of NGUI's event system through code: we assigned callback methods to events using EventDelegate.Set() and created tweens with effects entirely through code. We created our tooltip reference object and used the OnTooltip() event method to show localized tooltips.

We learned that public EventDelegate variables can be used to assign callback methods to events with a simple drag-and-drop through the Inspector view. It is important to note that these callback methods require both public and non-static methods to be accessible through the Inspector view.

The UIKey Binding and UIKey Navigation components were used and configured to enable full keyboard and controller compatibility for our menu and options page.

Finally, we made sure UI Root persists through scene changing using the Singleton class from which our MenuManager derives.

It's time to see how we can customize our UI with our own assets and fonts. Let's move on to Chapter 5, Atlas...