- Home /
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)
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:
What could be the problem? I've looked online and they all say to set the culling mask and depth, and I did that.
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).
Very helpful mentioning about depth (though I had a different issue). Thanks!
Your answer
Follow this Question
Related Questions
FPSControl and RPG Starter Kit conflict! 1 Answer
Bar with segments depending on a value. 0 Answers
Problems With NGUI on MAC 1 Answer
NGUI Texture 0 Answers
NGUI Buttons 2 Answers