Author Topic: NGUI with Unity  (Read 1506 times)

Tatanan

  • Jr. Member
  • **
  • Thank You
  • -Given: 11
  • -Receive: 0
  • Posts: 81
    • View Profile
    • Casual Arena
NGUI with Unity
« on: November 21, 2014, 01:03:25 PM »
I'll make my question with 1 example:
We're making a pool (billiards) game with NGUI. We'd like to use Unity real-3D balls, which are not allowed with pure NGUI.
How should we mix both NGUI with Unity in terms of depths?
Example: 3 layers: top-board layer, ball layer and bottom-board-layer.
Ball layer must be between top and bottom layer.
As far as I know, NGUI order layers by widget's depth, but Unity by ordering layers and z-index.
We are considering using 3 cameras since each camera may have different independent ordering depths.
Game developer on Casual Arena.

r.pedra

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 20
  • Posts: 131
    • View Profile
Re: NGUI with Unity
« Reply #1 on: November 21, 2014, 01:22:21 PM »
You can specify the Render Queue of the ball material and place them between the different Layers.

Imagine your Back Layer is widgets around 2000, balls are around 3000 and Top Layer is widgets around 4000.
(You can change the render queue with code)

Tatanan

  • Jr. Member
  • **
  • Thank You
  • -Given: 11
  • -Receive: 0
  • Posts: 81
    • View Profile
    • Casual Arena
Re: NGUI with Unity
« Reply #2 on: November 21, 2014, 01:27:38 PM »
Just that?
Thank you :D
Game developer on Casual Arena.