Author Topic: FastGUI UI and 3D Objects  (Read 5528 times)

Tripwire

  • Full Member
  • ***
  • Thank You
  • -Given: 9
  • -Receive: 0
  • Posts: 163
    • View Profile
FastGUI UI and 3D Objects
« on: December 12, 2012, 12:21:17 PM »
Hi,

I'm using FastGUI (plugin for nGUI) to make menu's from PSD files. Link: http://forum.unity3d.com/threads/115151-GUI-FastGUI-C-Easy-and-Fast. So when i use FastGUI i create a 2D UI.
So i have a 2D UI with a background and some buttons, and i want some 3D objects let's say a cube rotating in front on the UI background but behind the UI buttons. Is this possible with NGUI? And if so are there examples i can look at?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: FastGUI UI and 3D Objects
« Reply #1 on: December 12, 2012, 12:29:38 PM »
You will need to render that cube to texture using a secondary camera, then draw the texture using UITexture.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: FastGUI UI and 3D Objects
« Reply #2 on: December 12, 2012, 02:42:19 PM »
Or you set up 3 cameras in total with 3 unity layers - 2d background, 3d, 2d foreground.

Tripwire

  • Full Member
  • ***
  • Thank You
  • -Given: 9
  • -Receive: 0
  • Posts: 163
    • View Profile
Re: FastGUI UI and 3D Objects
« Reply #3 on: December 13, 2012, 09:24:18 AM »
Nice :D What i did:
2D UI with only the radial buttons in front of the 3d Object
3D Panel with a Camera and a cube and a directional light

So now i have 3 camera's and 2 2D UI's in my scene and it works very good!
Only question, is this performance heavy on IOS devices?

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: FastGUI UI and 3D Objects
« Reply #4 on: December 13, 2012, 09:53:55 AM »
It depends on how much you have in it. We use it in the Character and Board screen in Subway Surfers and that works pretty well. :)