NGUI for Unity – Book Review

Categories: Unity
Tags: No Tags
Comments: 4 Comments
Published on: February 13, 2014

NGUI for Unity

by Charles Bernardoff via PACKT Publishing available here: http://bit.ly/1lp1Do7

I had the opportunity to review the first book on the mega-popular NGUI user interface plug-in for Unity. NGUI is a great UI system for < $100 that you can add into your Unity projects. It is quite in-depth and very powerful so it requires a little ramp up time. The documentation used to be relatively sparse, only a bit on the developer’s website: http://www.tasharen.com/?page_id=140. Thank goodness now there is a full fledged book with tons of tutorials, examples, and explanations. I spent a little bit of time walking through some of the tuts and wanted to share what I found.

Versioning:

First of all, the versions of Unity and NGUI specified for the book and the latest version on the asset store as of Feb. 2014 differ a bit.

My current Unity/NGUI versions:

Unity = 4.3.3f1, NGUI = 3.4.8

Book NGUI version is:

NGUI = 3.0.2 Fortunately/unfortunately, there have been quite a few upgrades to the entire NGUI toolset since the book was written. This is a great sign, meaning NGUI is under active development and continuing to get better. However, the book is out of date in some sections, and when going through the tutorials, occasionally you have to hunt and peck to find the new location of things in the menu because there has been some re-ordering of the menus. For example, the old menus were laid out:

NGUI | Attach | Anchor

but now you will find it in:

Component | NGUI | UI | Anchor

Legacy:

Even though many of the menu options note that the tools are “Legacy”, you still need need to use them. For instance, you still need to use the Widget Wizard occasionally: NGUI menu 01

But the Widget Tool suggests you use the new preferred way which is a ‘Control …’ prefab. I tried using these as well as the components that the Widget Tool creates to better understand the system upgrade. This took a lot of extra time but helped me understand the legacy workflow and the new preferred workflow.

Tutorials:

Following the tutorials worked well for me. Sometimes it took a  little creative manipulation to make them all work but with the solid, explicit instructions and occasionally verifying your scene hierarchy, I got through them.

What this book does best is walk you through step-by-step how to create many different UIs. I have found that this is the best way for me to learn a new tool; actually doing it one step at a time at my own pace, digging in further when I don’t quite understand what is going on. I am a visual learner, so I understand and remember best if I can create these scenes myself, clicking through the Hierarchy, Inspector, and script editors.

Summary:

NGUI is the UI library of choice right now in Unity. There is a rumored new built-in UI upgrade coming to Unity sometime this year, though they’ve been promising that for literally 3+ years now. The new sole developer for Unity’s GUI is Michael Lyashenko, who wrote NGUI. It looks like NGUI is going to be the new UI system for Unity:

http://www.youtube.com/watch?v=5wcODp8Sh8o

UI development is a valuable, much-needed skill set in the Unity dev ecosystem. Consider investing some time into NGUI!

Post to Twitter

4 Comments
  1. bilal says:

    can i get this book

  2. Joseph Marritt says:

    Yeah I bought this book recently, I’m getting quite frustrated as some of the scripts are missing or completely different within the book compared with the NGUI version I have.

    I follow the book and go through the methodologies over and over again and my UI looks completely different, also the instructions are written so damn badly, drag background to here, sometimes you have 2 / 3 backgrounds as children to a parent and you have to trial and error through each one to get the correct result, PacKt is not very noob friendly and after the last book I got which failed me I’m getting to the point I will never buy from them again.

    • jason says:

      Joe,

      That is disappointing to hear that the book is now so far off from the current implementation of NGUI in Unity. At the time of the review, it was already diverging but with some effort I managed to adjust the instructions and get most of the tutorials to work. I did not get any of the scripts but I can imagine that those are changing quite a bit too. Unfortunately, I do not think any book on NGUI is going to ever be up to date.

      This is all relatively moot however, as NGUI will be slowly (or quickly?) unsupported, I suspect, as the developer now works for Unity and 5.0’s new UI system is all his new design which is very much based on NGUI’s workflow paradigm. I have been approaching NGUI as just a primer to help me more quickly ramp up with the new UI system released this fall with Unity 5.0. Get ready to revamp your UI, yet again!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Welcome , today is Wednesday, May 31, 2023