The Prefab Toolbar
We have added our first Background
control prefab by dragging it from the Project view to our Hierarchy view. Well, NGUI comes with a Prefab Toolbar that helps us organize them.
In order to show the toolbar, navigate to NGUI | Open | Prefab Toolbar.
A new window like this appears:
With this window, you can simply drag-and-drop one of the prefabs directly into the Scene or Hierarchy view!
You can organize your prefabs in up to five tabs. Use the buttons at the top of the window (1) to switch between different tabs.
If you want to add a prefab to the current tab, simply drag-and-drop your prefab from the Project or Hierarchy view inside the toolbar—or click on the Add (2) button.
Three different display modes (3) are available:
- Compact Mode: This displays small icons
- Icon Mode: This displays large icons. This is the mode set by default
- Detailed Mode: This displays a large icon along with the prefab name
Please set Display Mode (3) to Detailed Mode. It will be easier for us.
Now that we have seen how the Prefab Toolbar works, it's time to create buttons.