Unity3d NGUI usage (8) (NGUI 2DUI and 3DObjects coexist)

Source: Internet
Author: User

NGUI is a plug-in that focuses on the 2dui interface or animation. If 3d objects or particles are directly added to the UIRoot, they will not be displayed.

The main reason is that the 2d UI is projected using an orthogonal camera and added to the NGUI custom camera so that the projection range is within a square visible range.

Ignored in the visual representation of the Z axis


A. Create a light and a Camera in the Unity3d component menu.

B. Set the Camera parameter to add UICamera to Camera.


C. Create an NGUI 2d UI, delete component objects in the UI Root, and set the UI Root


D. Create a 3d UI group under UI Root and add the components added in the Widget Tool here

E. Create a GameScene level under the UI Root. The game 3d components are stored here.

F. Add some UI widgets under the 3d UI and add some components in the GameScene so that the 3d component and ui can be projected

View window

The g.3d Game component has a Z axis. Currently, the Camera is in the position of-1.5 and needs to be adjusted according to the Game settings.





Related Article

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.