Author Topic: NGUI 3.0.7 Resolution Independence  (Read 2366 times)

halsafar

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
NGUI 3.0.7 Resolution Independence
« on: May 06, 2014, 12:45:05 PM »
I purchased NGUI hoping it would save me some time.  If I actually get it working shortly it still might otherwise I've burned a whole ton of time on NGUI.

I would like to snap a GUI on the left and right side of my landscape screen.  This works fine for some devices (using the new anchor system) but as aspect ratios change and resolutions change the GUI is lost.

I also notice a disparity between the SCENE/GAME view and the 'Play' view.  While the scene might look great in scene builder and game view as soon as the play button is pressed things jump around (get smaller in this case). 

All tutorials I find are for older NGUI. 


halsafar

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: NGUI 3.0.7 Resolution Independence
« Reply #1 on: May 06, 2014, 02:07:11 PM »
I add a 2D UI -> camera -> panel -> container -> sprite.

I set the containers anchor to unified and adjust as I want it.

Looks good in Game mode, if I hit play it looks good.  If I deploy to an Android phone the GUI is mostly off screen.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI 3.0.7 Resolution Independence
« Reply #2 on: May 06, 2014, 09:59:14 PM »
What is it anchored to? If you want it to be anchored to the edge of the screen, you need to anchor it as such. Simply turning on anchoring doesn't mean that it will be anchored to the side.

Also... make sure that both your Game View and the Scene Views are visible at the same time. If your game view is hidden behind your scene view, Unity doesn't offer any way of determining the size of it properly, so the GUI layout is not going to be correct.