Author Topic: Fluid canvas like effect with NGUI... How?  (Read 2728 times)

SwabbyNat

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 9
    • View Profile
Fluid canvas like effect with NGUI... How?
« on: May 15, 2012, 05:09:22 PM »
We're currently producing a social game for Facebook using Unity and a lot of NGUI.

We have fluid canvas working (Fluid canvas allows the app to scale based upon the size of the browser window) but our UI is not acting how we expected it to.

Right now when the page is made larger, the UI scales with it. We would like to set a minimum scale (760x600) that the UI fits into as its smallest size, but if the browser page gets larger than that, the UI should anchor to specific areas. We have the anchor scripts all setup and working, but the scaling seems to be in direct relation to screen size.

Is there a way to keep panels at 1:1 pixel scale regardless of the overall window size?

Nathaniel Hunter
SiXiTS

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Fluid canvas like effect with NGUI... How?
« Reply #1 on: May 15, 2012, 05:14:19 PM »
Look at your UIRoot. It has the "automatic" setting, and an optional manual size. "Automatic" means it always uses pixel coordinates of the screen. Manual means it will always use the size you specified. Write a script that will change this value based on screen height if you want to have a min/max.