Author Topic: Trying to mix Unity's new gui with NGUI.  (Read 7896 times)

Sahkan

  • Jr. Member
  • **
  • Thank You
  • -Given: 9
  • -Receive: 0
  • Posts: 74
    • View Profile
Trying to mix Unity's new gui with NGUI.
« on: June 21, 2015, 12:32:33 PM »
I have a plugin that works on the new gui's canvas ( i can draw stuff on it in runtime ) and i want to place it in the middle of the screen in a certain panel.
At the moment, the new gui's canvas is below the NGUI's widgets, so they hide it, and i want it to be above them.
I'm trying to use the camera depth to move the new canvas forward ( to be above ngui's widgets ) and each time i do so, it just cause all the ngui's widgets to disappear ( or maybe become realllly small, because i see like a tiny box in the middle of the screen).
The new gui's canvas using it's own camera, and as far as i know it doesn't supposed to be a problem.
Is there a way to do it?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Trying to mix Unity's new gui with NGUI.
« Reply #1 on: June 21, 2015, 08:13:14 PM »
Check your camera settings. If something disappears, it means your top-most camera has chosen to clear the color, erasing the result of the cameras drawn before it. If something becomes really small, then you need to check layers that each camera sees. Each camera should only see a specific layer. No two cameras should see the same layer.

Sahkan

  • Jr. Member
  • **
  • Thank You
  • -Given: 9
  • -Receive: 0
  • Posts: 74
    • View Profile
Re: Trying to mix Unity's new gui with NGUI.
« Reply #2 on: June 22, 2015, 04:51:49 AM »
Check your camera settings. If something disappears, it means your top-most camera has chosen to clear the color, erasing the result of the cameras drawn before it. If something becomes really small, then you need to check layers that each camera sees. Each camera should only see a specific layer. No two cameras should see the same layer.

Thanks for the fast respond, it turned out it was a camera size issue, I had to set the size of the other camera to 1 just like the NGUI's camera, And then just playing with the Y value did the trick. :)