Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Brizzler on July 09, 2013, 07:13:34 AM
-
Hi,
I'm displaying a series of NGUI panels all of which work fine.
However, when I switch over to another camera and then back to 'Main Camera' on the 1st Person Controller subsequent panels don't appear.
They have been activated as I can see them in the hierarchy but they don't appear on screen.
Also, it only happens when switching back to the FPC camera, they appear no problem on the 'other' camera.
I'm using Playmaker to control all the actions - 'Cut to camera'
Any ideas?
-
Check your layers. Everything must be on the UI layer.
-
The FPC and 'other' camera were set to the default layer so I've changed them both to the GUI layer which NGUI uses but the panels still don't appear.
Anything else?
-
FPC? Let me clarify:
The UI camera must be on the UI layer, and set to draw only the UI layer. The game camera must be on the Default layer, set to draw everything except the UI layer.
-
You said 'everything must be on the UI layer' so I changed the FPC camera and 'other' camera over to the GUI layer!! :)
Anyway, they're all back on the default layer and it still doesn't work.
What is it that I need to do when switching back to the main FPC camera as everything is fine before this including the view from another secondary camera.
EDIT
I've set the depth of the NGUI camera to 1 (main camera at 0) and the panel now appears but disappears behind any 3D objects if I walk around.
Should I be doing anything with the culling masks on the camera?
-
Ooooh! Set the 'Clear flags' on the GUI camera to 'Depth only' and it all works fine now.
Not sure what that was all about :o