Hello Guest

Author Topic: 2Dtoolkit UI Camera Layer  (Read 3843 times)

Danim3D

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 2
    • View Profile
    • http://www.Danim3D.com
2Dtoolkit UI Camera Layer
« on: April 07, 2015, 05:49:59 pm »
Hi, I'm looking for information on how to use one camera as a layer for 2Dtoolkit UI and the other Main Camera as a layer for everything else in the game. Also I want the 2Dtoolkit GUI layer camera to always display above 3D mesh polygon object.

I could do this with NGUI but I want to do it with 2dtoolkit UI. I need to use two camera because I want to use different camera Orthographic size for both camera.

Thanks,
« Last Edit: April 07, 2015, 05:53:16 pm by Danim3D »

Danim3D

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 2
    • View Profile
    • http://www.Danim3D.com
Re: 2Dtoolkit UI Camera Layer
« Reply #1 on: April 08, 2015, 01:05:27 am »
To answer my own question here is the solution I found.

On the UI Camera check theses 3 settings :
- Clear Flags = Depth only (this make sure the background is transparent)
- Culling Mask = UI (you need to make sure all your UI element are set with the UI layer)
- Depth = higher value than the first Camera so it will show above

 :)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2Dtoolkit UI Camera Layer
« Reply #2 on: April 08, 2015, 11:11:46 am »
Hi, thats correct. tk2d camera is just a wrapper around a normal Unity camera, so anything that works with a normal camera will work here.