Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
NGUI for Unity

You're reading from   NGUI for Unity The NGUI plugin for Unity makes user interfaces so much more efficient and attractive. Learn all about it in this step-by-step tutorial that includes lots of practical exercises, including creating a fun 2D game.

Arrow left icon
Product type Paperback
Published in Jan 2014
Publisher
ISBN-13 9781783558667
Length 182 pages
Edition Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Charles Bernardoff (EURO) Charles Bernardoff (EURO)
Author Profile Icon Charles Bernardoff (EURO)
Charles Bernardoff (EURO)
Arrow right icon
View More author details
Toc

Creating our first widget


We will create our first sprite widget to display our main menu's background window. In order to do that easily, NGUI has a Widget Wizard with a few templates for us.

Widget Wizard

The Widget Wizard can be opened by navigating to NGUI | Open | Widget Wizard. It will look like the following screenshot:

As you can see in the previous screenshot, to create a widget, you require Atlas and Font to be configured. As said in Chapter 1, Getting Started with NGUI, an atlas is a large texture containing the sprites that you need to create your UI. For the rest of this chapter, we will use the default atlas named SciFi Atlas , which is included in the plugin.

Selecting an atlas

Let's select our default SciFi atlas, which contains the necessary sprites, as follows:

  1. In the Project view, navigate to Assets | NGUI | Examples | Atlases | SciFi.

  2. Drag-and-drop the prefab SciFi Atlas.prefab in the Atlas field.

  3. Drag-and-drop the prefab SciFi Font – Header.prefab in the Font field.

We have...

You have been reading a chapter from
NGUI for Unity
Published in: Jan 2014
Publisher:
ISBN-13: 9781783558667
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image