Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: SatMangieri on August 06, 2014, 12:04:54 PM
-
Now i know why Unity status says that there is 3 draw calls and the draw calls tool say there is only 1. I have a confusion and i don't know how to setup the Main Camera.
I've got this from another user in the forum:
"I'm betting that the main camera is not culling the layer that is assigned to the texture. I'm also betting that the UI Root camera's culling mask is also set to that layer. So you have 1 draw from the UI Root camera, 1 draw from main camera + 1 draw for the main camera's background. Total those up and you have 3 draw calls"
And my question is how do i setup the Main camera & NGUI camera to have just 1 draw Call.
-
You have 2 cameras in your Hierarchy.
I'm betting that the main camera is not culling the layer that is assigned to the texture. I'm also betting that the UI Root camera's culling mask is also set to that layer. So you have 1 draw from the UI Root camera, 1 draw from main camera + 1 draw for the main camera's background. Total those up and you have 3 draw calls
-
Start a new scene, and add a sprite (ALT+SHIFT+S). Note that although you have a main camera and a newly added UI camera, there is only 1 draw call present. This is because the main camera doesn't draw anything (there is nothing visible).
So all I can tell you is -- check what's drawn by your main camera.
-
Thanks Man
You were right! All good now 1 draw
Btw whats the best set up for mobile & tablets targets to deploy?
-
Start a new scene, and add a sprite (ALT+SHIFT+S). Note that although you have a main camera and a newly added UI camera, there is only 1 draw call present. This is because the main camera doesn't draw anything (there is nothing visible).
So all I can tell you is -- check what's drawn by your main camera.
If checkbox "Use Direct3D 11" in Player settings is unchecked, then yes, empty scene with default NGUI 2D UI (without any widgets) has 0 draw calls.
But if "Use Direct3D 11" is checked, drawcalls count equals 2 (1 for main camera and 1 for UI camera).
It is normal?
-
I think that would be a question for Unity. My guess is that clearing the screen = 1 draw call.