Author Topic: Multiple UI Roots with different Scaling Styles...  (Read 1853 times)

aholla

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 40
    • View Profile
Multiple UI Roots with different Scaling Styles...
« on: May 01, 2014, 06:06:53 AM »
Hey!

New to NGUI but getting there. I have a question regarding the "scaling style" of the UI. I would like to have two different scaling styles, one "fixed size" and the other "pixelperfect". This would allow me to have one set of UI scale and the other not scale, for example, my HUD will be pixel perfect but my menu panels will be fixedSize.

So far the only way I have found to achieve this is to use two UI Roots. Is there another or a better way to achieve this?

Also when doing so The pink/purple indicator for the UIRoot both get positioned on top of each other in the editor. I presume this is not the desired effect because it is pretty confusing.

Thanks.

Adam
« Last Edit: May 01, 2014, 08:10:52 AM by aholla »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Multiple UI Roots with different Scaling Styles...
« Reply #1 on: May 02, 2014, 07:45:16 AM »
Yup, two UIRoots. I did the same thing in Starlink. Most of the UI was 3D, so not pixel perfect, and I had another one that was 2D, and that one I made pixel-perfect.

aholla

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 40
    • View Profile
Re: Multiple UI Roots with different Scaling Styles...
« Reply #2 on: May 07, 2014, 04:33:51 AM »
Thanks, any in info on the camera selector?

Also with two roots, it okay to delete the camera from one, right?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Multiple UI Roots with different Scaling Styles...
« Reply #3 on: May 08, 2014, 03:07:05 AM »
If both UIs are on the same layer and are drawn by the same camera, then sure, you can delete one of them.

Not sure what you mean by the selector and the purple indicator being positioned on top of each other. Why wouldn't they be if they are both in the same place?