Author Topic: Best Approach?  (Read 5805 times)

rookie_coder

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 14
    • View Profile
Best Approach?
« on: March 21, 2014, 03:11:43 PM »
I understand 3d objects cannot be contained in a Panel. Here is what I am trying to do. What is the best approach?

Match 3 game made of CUBE prefabs. I want to use NGUI for the 2d panels, buttons, tabs etc on each level. This is easy. I want the remaining space to be used for the game with 3d objects. This space would have its own 3d camera. Writing the Match 3 game seems to be the easy part. The challenge is to have the 3d part resize for different screens - desktop, mobile. I can keep UIRoot fixed size, but that takes care of the 2d items - buttons etc. What about the remaining area with 3d objects? What container do I toss this into to get the resizing for different environments that I need. I don't want to have to hard-code any dimensions.

Thanks,
Syed

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Best Approach?
« Reply #1 on: March 21, 2014, 04:09:47 PM »
The easiest thing to do is to have your 3D object camera draw the object(s) into a render texture (off-screen), then use that render texture in NGUI (UITexture).