Author Topic: Ngui Ipad Build Problem ver 3.5.6  (Read 5503 times)

bloobmob

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Ngui Ipad Build Problem ver 3.5.6
« 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

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Ngui Ipad Build Problem ver 3.5.6
« Reply #1 on: April 23, 2014, 06:27:16 AM »
Pic of the issue might help. Also the latest version is 3.5.8 as of this writing, not 3.5.6.

bloobmob

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: Ngui Ipad Build Problem ver 3.5.6
« Reply #2 on: April 23, 2014, 07:17:53 AM »
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

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Ngui Ipad Build Problem ver 3.5.6
« Reply #3 on: April 23, 2014, 07:44:53 AM »
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.

bloobmob

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: Ngui Ipad Build Problem ver 3.5.6
« Reply #4 on: April 23, 2014, 07:49:54 AM »
you mean set the UI camera clear flags to depth only?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Ngui Ipad Build Problem ver 3.5.6
« Reply #5 on: April 23, 2014, 08:01:50 AM »
Yeah.

bloobmob

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: Ngui Ipad Build Problem ver 3.5.6
« Reply #6 on: April 23, 2014, 08:20:54 AM »
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)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Ngui Ipad Build Problem ver 3.5.6
« Reply #7 on: April 24, 2014, 12:28:53 AM »
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.

bloobmob

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: Ngui Ipad Build Problem ver 3.5.6
« Reply #8 on: April 24, 2014, 01:05:20 AM »
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

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Ngui Ipad Build Problem ver 3.5.6
« Reply #9 on: April 24, 2014, 01:26:02 AM »
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?

bloobmob

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: Ngui Ipad Build Problem ver 3.5.6
« Reply #10 on: April 24, 2014, 02:59:12 AM »
we used the skybox marmoset shaders

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Ngui Ipad Build Problem ver 3.5.6
« Reply #11 on: April 25, 2014, 05:27:17 AM »
Yeah, that's likely the issue. Make sure that objects are drawn using different cameras then. NGUI should have its own camera.