NGUI 3 UI Position On Mobile

‚ÄčThe current game I’m working on is primarily for mobile devices, and it has quite a few UI elements and we want the visuals and placement to be as close as possible on all devices. I didn’t set up the UI in our previous games, so I didn’t know why it wasn’t adjusting like our other games. Luckily it was an easy fix.

UIRoot Constrain
UIRoot Constrain

When I created the NGUI UI, the UI Scaling Style was set to Pixel Perfect. That’s why my UI was super tiny on Retina devices. I figured out that changing it to Constrained or in my case, ConstrainedOnMobiles was the fix and now the UI on my iPhone5s and iPad 3rd gen look the same!

UIRoot height
UIRoot height

Categories

Archives