- Home /
UI not scaling properly
When the game is ran in the inspector (With a HTC One M7 connected via USB) the UI shows up like it is designed to. But when the build is ran on the device solely, the UI is messed up. What causes this and can it be set to scale according to the resolution of the device being used?
In inspector: http://i.gyazo.com/e78301c39ace029d7ea4b747b6928879.png
Standalone build: http://i.gyazo.com/fb2a9824fd909953f9f97a3225e15c3a.png
Answer by Addyarb · Jul 12, 2016 at 03:01 AM
This is a very common issue with canvases exporting to mobile devices. On your Canvas GameObject, find the "Canvas Scaler" script. From the "UI Scale Mode" drop-down, set the scale mode to "Scale With Screen Size." Then, rebuild. Note, when you first change it - your UI will likely jump around and appear much smaller. It's necessary to fix the UI the way you want it before continuing.
Answer by Fragmental · Jul 11, 2016 at 11:30 PM
What are your canvas scaler settings?
Also, are you instantiating anything?