[Unity plugin] UIPanel, NGUI Core Component

Source: Internet
Author: User
NGUI: UIPanel

UIPanel is responsible for creating the actual set graphics. You do not need to manually add UIPanel-once you create a control, it will be automatically added. If you want to split your UI rendering into different Draw calls, you can manually create your own UIPanel. For example, you want to create a split-screen game, each screen is rendered with a camera. In this case, you need two UIPanel to avoid overlapping controls.

Parameters

The Panel Tool determines whether the Panel is displayed in the Panel Tool. The temporary Panel that is dynamically created can turn this option off, such as the HUD blood strip and rolling combat text.

The Normals flag allows you to determine whether the UI's ry is affected by the normal and tangent. If your UI is affected by illumination, this option needs to be selected.

Depth Pass allows you to add an additional Draw Call for rendering Depth. Enabling this option can save some filling rate, because the objects behind your opacity control will not be rendered.

-----------------

Widgets tells you how many Widgets the Panel renders

Draw CILS tells you how many Draw Calls this Panel will consume. The lower the value, the higher the efficiency.

Debug Info allows you to select which debugging information to display

Clipping allows you to choose whether to use the cropping function. By default, no cropping is performed. Shader is used for cropping. After any cropping mode is selected, NGUI automatically obtains a shader of the cropping version and updates the material.

If you select the cropping mode, you can select the center point and size of the cropping area, in pixels. If you do not modify the default values of these parameters, the system will crop them according to the size of the entire screen. This is the same effect as not cropping.

If you select SoftAlpha in cropping mode, you can change the Softness parameter. This parameter determines the width of the edges to fade out. The four edges in the entire cropping area are equal.

Material is a read-only value. You may see more than one material. Each material consumes one Draw Call. For convenience, the number of faces of each Draw Call is also displayed here

Tips

1. By default, if UIPanel does not exist, it is automatically created in the control at the root layer. Therefore, it is best to organize your UI to a common parent node.

2. You can organize the texture and font used by UIPanel into the same atlas to reduce the number of material used by UIPanel.

3. You can safely delete UIPanel that is not used or has 0 widgets displayed.

4. if you delete a UIPanel that also manages other widgets, these widgets will disappear. Click Play or disable to drop these widgets and enable them to display them again (in fact, a new UIPanel is added again)

5. As long as nothing changes, the created ry will not be rebuilt. This means that if your UI remains unchanged, these ry images will not be updated every frame, and they will be reused all the time, which improves some efficiency.

 

Address: http://blog.csdn.net/daiguangda/article/details/7840084

NGUI: UIPanel

UIPanel is responsible for creating the actual set graphics. You do not need to manually add UIPanel-once you create a control, it will be automatically added. If you want to split your UI rendering into different Draw calls, you can manually create your own UIPanel. For example, you want to create a split-screen game, each screen is rendered with a camera. In this case, you need two UIPanel to avoid overlapping controls.

Parameters

The Panel Tool determines whether the Panel is displayed in the Panel Tool. The temporary Panel that is dynamically created can turn this option off, such as the HUD blood strip and rolling combat text.

The Normals flag allows you to determine whether the UI's ry is affected by the normal and tangent. If your UI is affected by illumination, this option needs to be selected.

Depth Pass allows you to add an additional Draw Call for rendering Depth. Enabling this option can save some filling rate, because the objects behind your opacity control will not be rendered.

-----------------

Widgets tells you how many Widgets the Panel renders

Draw CILS tells you how many Draw Calls this Panel will consume. The lower the value, the higher the efficiency.

Debug Info allows you to select which debugging information to display

Clipping allows you to choose whether to use the cropping function. By default, no cropping is performed. Shader is used for cropping. After any cropping mode is selected, NGUI automatically obtains a shader of the cropping version and updates the material.

If you select the cropping mode, you can select the center point and size of the cropping area, in pixels. If you do not modify the default values of these parameters, the system will crop them according to the size of the entire screen. This is the same effect as not cropping.

If you select SoftAlpha in cropping mode, you can change the Softness parameter. This parameter determines the width of the edges to fade out. The four edges in the entire cropping area are equal.

Material is a read-only value. You may see more than one material. Each material consumes one Draw Call. For convenience, the number of faces of each Draw Call is also displayed here

Tips

1. By default, if UIPanel does not exist, it is automatically created in the control at the root layer. Therefore, it is best to organize your UI to a common parent node.

2. You can organize the texture and font used by UIPanel into the same atlas to reduce the number of material used by UIPanel.

3. You can safely delete UIPanel that is not used or has 0 widgets displayed.

4. if you delete a UIPanel that also manages other widgets, these widgets will disappear. Click Play or disable to drop these widgets and enable them to display them again (in fact, a new UIPanel is added again)

5. As long as nothing changes, the created ry will not be rebuilt. This means that if your UI remains unchanged, these ry images will not be updated every frame, and they will be reused all the time, which improves some efficiency.

 

Address: http://blog.csdn.net/daiguangda/article/details/7840084

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.