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

Chapter 4. C# with NGUI

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.