0

I have a mobile game developed by U3D and NGUI and targeted to platforms such as android and IOS, but there are so many mobile resolutions and aspect ratios change from 1.3 to event 2. My UI are designed under resolution 1136x640, and UIRoot Scaling style is FixedSize, Manual Height is 640. I am not going to use anchors in NGUI widgets because distance is defined in pixels but not in percentages, when resolutions are changed, relative position of widgets are also changed, this is not what I want. I refer this but still have no idea to handle this tricky problem perfectly, I need some suggestions on how to use NGUI in right way to handle different mobile resolutions.

GrandMasterFlush
  • 6,269
  • 19
  • 81
  • 104
Cosmore
  • 3,193
  • 4
  • 20
  • 22

1 Answers1

0

The newest (3.x.x) NGUI allows you to use their new anchoring system. As you said, it is specified in pixels, however you can specify different targets and distances to different edges, and it will behave similarly to percentages.

Are you familiar with NGUI team videos explaining their new releases? https://www.youtube.com/watch?v=6k5iIzKTEBQ Some of the information there could be helpful, and playing with Custom settings of anchors either.

Another useful things is to create scaling script attached to root, which scales all elements down, basing on the detected dpi. If your UI is prepared for phones, you probably won't need all the buttons to take the same percent of the screen on tablets.

kreys
  • 987
  • 4
  • 21
  • Yes the new anchoring system allows for % anchors, so you can set a button to be say 33% width of the screen etc. A further point is you can also use reference atlases to set a different set of assets to be used depending on device (or however you choose) so you can provide higher res graphics for a better res tablet etc. – Dover8 Aug 07 '15 at 15:13