Learning NGUI for Unity
上QQ阅读APP看书,第一时间看更新

Summary

During this first chapter, we understood the basics of NGUI. After importing the NGUI plugin, we created our first label and sprite and reviewed their parameters. We also created our own 2DUI layer for our UI to reside on.

Finally, we analyzed the elements that were created automatically for us by NGUI. After reviewing their parameters, we can summarize their roles as follows:

  • UI Root: This holds our UI and handles ScalingStyle: Flexible (pixel-perfect) or Constrained Constrained (stretched UI).
  • UIPanel: This renders our widget's actual geometry, with or without clipping.
  • Camera: This views the widgets and renders them over Main Camera. Its attached UICamera sends event messages to widgets using raycasts.

We are now ready to move on to Chapter 2, Creating NGUI Widgets, in which we'll create buttons, pop-up lists, input fields, checkboxes, and more!