Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by MoradSMedia · May 19, 2015 at 09:02 AM · ngui

Mixing NGUI Camera with Main camera problem

Hello.

I'm having a problem mixing my Main camera (Which should display the 3d model) and my NGUI camera (which should display the background sprite on the background).

I've set up a scene like this (main camera and NGUI camera are indicated) alt text

I've set my UI Root (ngui ui) layer to NGUI (and all it's children)

Now, in my main camera, I set my culling mask to everything but the NGUI layer. In my ngui camera, I set my culling mask only to NGUI.

I also set my main camera's depth to 0, and my ngui camera's depth to 1... I also tried the reverse, same result.

My problem is that in the game view, only the NGUI background appears and the 3D model does not, like so:

alt text

What could be the problem? I've looked online and they all say to set the culling mask and depth, and I did that.

1.png (68.8 kB)
gameview.png (271.7 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by smallbit · May 19, 2015 at 09:13 AM

Can you see the model on the game view when you disable NGUI camera? if yes change order, main camera needs to have higher depth (because it draws on top of background) also don't forget to change clear flag to dont clear

Also the setup is strange, is the NGUI content a background of a game? or you just do some testing? If you need 3d models inside menu (or so) in most cases you can use just NGUI camera (set model to NGUI layer).

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image MoradSMedia · May 19, 2015 at 11:23 AM 0
Share

Changing layers order and mask worked. Thank you :)

avatar image sunwangshu · Apr 03, 2019 at 12:36 AM 0
Share

Very helpful mentioning about depth (though I had a different issue). Thanks!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

NGUI Implemeting Date Picker 0 Answers

Positioning Label with NGUI 1 Answer

loading assetbundle from assets folder 0 Answers

Having proper text areas in unity? 0 Answers

Are these problems are related to a NGUI change (update) 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges