In this chapter, we will talk about C# scripting with NGUI. We will learn how to handle events and interact with them through code. We'll use them to:
Play tweens with effects through code
Implement a localized tooltip system
Localize labels through code
Assign callback methods to events using both code and the Inspector view
Add keyboard keys and controller navigation
Save user interface options like checkboxes, sliders and popup lists states
Create a singleton pattern to have a persistent UI through scene changing
We'll learn many more useful C# tips throughout the book. Right now, let's start with events and their associated methods.