Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: bloobmob on April 23, 2014, 06:19:57 AM
-
We are working on a project using Unity and a purchased version of Ngui 3.5.6,we started building the project using the free 2.70 ver of ngui
after purchasing the full Ngui we encoutered several problems
we have one particular enviroment where we have used a Ngui sprite to create a static BG and in front of it we used a mesh with particle animation and in front of that we have Ngui UI.
Everything works fine in gamemode in Unity,but when export it (build it) to an Ipad (for which the app is being built) something happens to the mesh ,as if the BG sprite intersects with the mesh clipping it,we have tryed a lot of things and nothing seems to work
I would also like to state that this is the first project we are attempting with Unity and therefore with Ngui aswell,so we dont have much experience with it.
PS, its important to stress that in game mode all is well
-
Pic of the issue might help. Also the latest version is 3.5.8 as of this writing, not 3.5.6.
-
Thank you for quick response,
we have updated to 3.5.8 and the same problem remains
the following are 2 pics ,one of how it liiks in game mode in Unity and one of how it looks on the Ipad
-
Make sure you are using different cameras here. UI camera should be different from the game camera, and the UI camera should be set to clear depth while the game camera should clear everything.
-
you mean set the UI camera clear flags to depth only?
-
Yeah.
-
I've set the main cam to skybox and UI cam to depth only ,still getting the same problem on the Ipad
Is there anything else I can try? (pretty desparate here)
-
I would say check the shaders used by your objects. UI seems to be showing up just fine, it's your other stuff that doesn't show, which suggests that shaders may not be supported.
-
yes it would seem logical but the problem is when I run the old version which used free ngui 2.70 everything was running great on Ipad the only change that was made is the upgrade the the full version of ngui
-
NGUI 2 sorted everything by Z position. NGUI 3 sorts everything by widget depth. Doing so also makes all NGUI draw calls get ever-increasing render queues, starting at 3000 for the first one, then 3001 for second, etc. The normal "Transparent" shader uses a render queue of 3000. So if you have an NGUI background, and on top of it you try to draw a 3D object within the UI hierarchy using the Transparent shader, you may run into issues. What shaders are used by your UI and by your objects?
-
we used the skybox marmoset shaders
-
Yeah, that's likely the issue. Make sure that objects are drawn using different cameras then. NGUI should have its own camera.