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, you have learned how to configure a pixel-perfect flexible UI and understood that with this configuration, it is important to anchor widgets relatively to the screen's bounds to ensure they aren't displayed outside the screen.

We have created different bitmap font sizes to avoid aliasing with large texts. There are three typical sizes: small (30), medium (50), and large (100).

A reference atlas has been used to point to one of the following atlases: SDAtlas, HDAtlas, or SHDAtlas. Depending on the screen's width, our new AtlasSwitchController script loads and sets the adapted atlas for the current device it's running on.

In order to ensure that our sprites remain crisp after the atlas switching, we make sure all widgets are pixel perfect using the MakePixelPerfect() method.

Finally, you learned how to configure a reference font that lets you change multiple labels' assigned fonts by simply making the reference point to another font file.

You now understand and master the...