The ngui I use is 3.5.4, And the Unity3d version is 4.3.4f.
Download NGUI, which is a cracked version for learning. If it is commercially available, please support genuine
Plugin Import
1. Import NGUI. Double-click NGUI Next-Gen UI v3.5.4.unitypackage to import all resources.
2. When NGUI appears in the menu bar, the current import is complete.
3. Click NGUI-Create-Widget to Create a UI Root-Camera-Container in the current window.
UI Root: a 2d UI container. The options in the container are very important, as shown in figure
Among them, Scaling Style (Scaling type, including three)
A. PixelPerfect: pixel first, indicating rendering based on the original image size
B. FixedSize: fixed the size and scaled Based on the camera size.
C. FixedSizeOnMobiles: resize the current image on a mobile device to fit all mobile devices.
Minimum Height-Minimum Height of the UI Root
Maximun Height-maximum Height of UI Root
Shrink Portrait UI-scaling the Portrait UI (UI is scaled when the mobile phone is switched to the Portrait)
Adjust by DPI-use pixels to adapt to the UI
By default, we add a Panel and a static Rigid Body (to respond to events)
Camera:
Clear Flags: the background of the camera projection, including SkyBox, SoidColor, Depth Only, Don't Clear. The options correspond to different settings.
Culling Mask: Camera Mask
Projection: Camera Projection, divided into orthogonal (Orthographic), fixed visible area, and Perspective (Perspective)
Size: the Size of the orthogonal camera.
Clipping Planes: Camera cut size
Viewport Rect: the size of the camera preview window
Depth: the Depth of the camera. 0 indicates the top layer.
Rendering Path: the Rendering Path, which affects the image quality. It is generally related to the platform.
Target Texture: Projection Texture of the camera
Occlusion Culling: Occlusion Removal (when the object is not within the camera's visible range, no rendering is performed)
HDR: highlight Rendering
UICamera (Script ):
Event Type: RESPONSE Event Type. UI (NGUI events, World events in game, And Unity2d events in Unity GUi)
Event Mask: When a button is clicked, only the Event of the current button is returned, and the lower button is not affected.
Debug:
Allow Multi Touch: whether Multi-Touch is supported. If the game is not needed, select a different one.
Sticky Tooltip: Tooltip
Tooltip Delay: Delay prompt
Raycast Range: ray detection Range
Event Sources: Event Source
Thresholds (parallax, indicating the execution delay ):
Axes and Keys: axial and button, which encapsulates the use of Xbox, PS3, and other controllers
Container: component inner
Alpha: Transparency
Povot: center point
Depth: rendering level
Dimensions: Density
Aspect Ration: linear cut ratio
Anchor: Anchor
The above is a detailed description of the parameters, which are used below. When encountering parameters, I will also introduce them:
Click NGUI-Open-Widget-Wizard to Open a component option panel.
Atlas: texture set for static Fonts
Font: Font
Template: Template. All widgets are selected here.
Color: font Color
Add To: To which container To Add
In this simple way, you can see that a label and tag parameter have been added to the container. continue to the next article.
Unity3d NGUI usage (1) (plug-in parameter description and usage)