# Problems with UI scaling on build

**URL:** https://discussions.unity.com/t/problems-with-ui-scaling-on-build/1707646
**Category:** UGUI
**Tags:** UGUI, Question, 6.3
**Created:** [February 5, 2026, 10:33pm UTC](https://discussions.unity.com/t/problems-with-ui-scaling-on-build/1707646 "2026-02-05T22:33:05Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![beetlebot124](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/beetlebot124/32/905867_2.png) [@beetlebot124](https://discussions.unity.com/u/beetlebot124)
#### Post date: [February 5, 2026, 10:33pm UTC](https://discussions.unity.com/t/problems-with-ui-scaling-on-build/1707646/1 "2026-02-05T22:33:05Z")

</div>

The components of this dialogue box all move when the game is built but looks fine in play mode. I’m not sure what can cause this kind of thing. Everything moves central. “Stern Woman”, “press f to continue…”, and her portrait have all moved inwards, as well as the text taking up a different amount of space (which will be a problem when the text takes up almost the whole box). I have screenshots of the main canvas component, its child the CharacterDialoguebox, and its various children, including the character’s name and the character’s portrait. I thought since I put the canvas scaler to Scale With Screen Size, this wouldn’t be a problem. It works in Unity, both in minimized and maximized Game windows.

Any suggestions would be appreciated.

 ![Screenshot 2026-02-05 162529](https://europe1.discourse-cdn.com/unity/original/4X/9/f/3/9f37279e6d5daeeb7d3ce0f6fa0aa2438b6e57b8.png)  
 ![Screenshot 2026-02-05 162725](https://europe1.discourse-cdn.com/unity/original/4X/0/2/a/02a11982df841e33805955c5f40b7b4625f2b71f.png)  
 ![Screenshot 2026-02-05 162549](https://europe1.discourse-cdn.com/unity/original/4X/e/7/f/e7fcfb246ea2d245d3aa82d8b84e74f581352cb3.png)  
 ![Screenshot 2026-02-05 162601](https://europe1.discourse-cdn.com/unity/original/4X/3/3/4/334f1219e02ecaf4259624d6eca2e5eb269b6fcb.png)  
 ![Screenshot 2026-02-05 162625](https://europe1.discourse-cdn.com/unity/original/4X/9/4/e/94ee16566bb45403db7002e9c1fc50a4f3e5537e.jpeg)  
 ![Screenshot 2026-02-05 162631](https://europe1.discourse-cdn.com/unity/original/4X/1/4/5/1456befce5db96cc28420400d5ff8d94c2b18612.png)

---

<div class="post-metadata">

### Author: ![Kurt-Dekker](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/kurt-dekker/32/101578_2.png) [@Kurt-Dekker](https://discussions.unity.com/u/Kurt-Dekker)
#### Post date: [February 6, 2026, 12:27am UTC](https://discussions.unity.com/t/problems-with-ui-scaling-on-build/1707646/2 "2026-02-06T00:27:55Z")

</div>

For Unity UGUI, here are the official docs on how to make your UI handle various resolutions and aspect ratios cleanly:

> **[Unity - Manual: Designing UI for Multiple Resolutions](https://docs.unity3d.com/2023.1/Documentation/Manual/HOWTO-UIMultiResolution.html)**

Here are some notes on UI Anchoring, Scaling, CanvasScaler, etc:

> [@Inconsistent game object placement/size between two people](https://discussions.unity.com/t/inconsistent-game-object-placement-size-between-two-people/845782/4):
>
> It can be very fiddly but it is super-powerful once you reach comfort with the UI. Building upon Praetor’s great post above, let me suggest this approach: make a quick first draft of your UI. in the Unity game window change the shape / dimensions of your Game window (you can even make your own resolutions) see what happens to your UI in this new shape window iterate and fix your anchors and scalings and whatnot Make sure you do not overlook the Canvas Scaler settings. Personally I (almost) …

> [@SOLVED: Game UI Button Size problem](https://discussions.unity.com/t/solved-game-ui-button-size-problem/848795/5):
>
> That seems excessive… What is the text of the actual complaint from them? Make something like this with a fixed aspect ratio (in this case 2:1, maybe you need 3:1 or whatever suits your buttons), and ALL your buttons anchored inside it to never move within that box: [7337383--891847--fixed\_aspect\_ratio\_box.png] then anchor that fixed against the bottom center (red dot below). On the ipad it looks like: [7337383--891850--ipad.png] on the iPhone it looks like: [7337383--891853--iphonex.pn…

Usually you need to choose a suitable ScaleMode and MatchMode in the Canvas Scaler and stick with it 100%. Generally if you change those settings you will often need to redo your UI entirely.

Here’s some more fit-inside-UI-content notes:

> **[Making UI elements fit the size of their content | Unity UI | 1.0.0](https://docs.unity3d.com/Packages/com.unity.ugui@1.0/manual/HOWTO-UIFitContentSize.html)**

I also use this `CanvasScalerOrientationDriver` utility to make sharing UI for Landscape / Portrait easier. Read what it does carefully.

> <https://gist.github.com/kurtdekker/8802b1b6c708637398f8c9167641efd3>

For the in-scene 2D or 3D portions:

Generally cameras are tied height-wise to the `.orthographicSize`, or the `.fieldOfView`

You can test directly in the UnityEditor Game window by choosing custom aspect ratios and pixel ratios (look for a dropdown near the top left of the Game window), and you should do this for all anticipated major screen geometries, then test and fix your program until it works the way you want.

To tie it to the width, use ratios with the `Screen.width` and `Screen.height`, or alternately whatever pixel viewport you are rendering to. Remember those are integers so dividing them properly requires casting at least one of them to a `float`

> [@How to make 3d scene look the same on different mobile screens](https://discussions.unity.com/t/how-to-make-3d-scene-look-the-same-on-different-mobile-screens/1693809/4):
>
> The way your game presents itself is essentially an engineered digital window. Studying what other games do and pausing as you play them to identify what is actually happening can be very useful. This can help you construct the mental tools necessary to understand the problem space of designing and engineering digital window for your specific game. It is not physically possible for a 9:16 aspect ratio phone to EVER “look the same” as a 10:22 aspect ratio phone. That’s not a thing, unless I s…

---

<div class="post-metadata">

### Author: ![CodeSmile](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/codesmile/32/82968_2.png) [@CodeSmile](https://discussions.unity.com/u/CodeSmile)
#### Post date: [February 6, 2026, 4:11pm UTC](https://discussions.unity.com/t/problems-with-ui-scaling-on-build/1707646/3 "2026-02-06T16:11:19Z")

</div>

> [@beetlebot124](#):
>
> I thought since I put the canvas scaler to Scale With Screen Size, this wouldn’t be a problem

It scales perfectly with screen size **provided** that the screen’s aspect ratio remains the same. You set 768/512 which means a 3:2 aspect (=1.5). The 16:9 aspect = 1.77777 and 4:3 = 1.33333.

So whenever the aspect ratio deviates from 3:2 is when you’ll get displacement, which will be the norm since 3:2 is rather uncommon I’d say. Change the Screen Match Mode to MatchWidthOrHeight and then - very importantly - make it rely on either width OR height, not both. That’s how you get the “easy way out”.

But this only works if it’s considered in the UI design. Meaning you could have a top and bottom UI that stays fixed on the top/bottom edges - top and bottom UI just move closer or further apart when the aspect changes.

It’s best you test this right in the game view: modify the game view’s aspect ratio or resolution (create your own if you have to) and then toggle through the various resolutions to see how your UI behaves. It’s best to have one (custom if necessary) resolution for each of the most “extreme” aspects. Ie if you want to support desktop be sure to verify against 32:9 and if you suspect very old computer users (or tablets) then also verify against 4:3 or 5:4.

If aspects vary too much, you may have to design two different platform or aspect dependent UIs.

---

<div class="post-metadata">

### Author: ![beetlebot124](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/beetlebot124/32/905867_2.png) [@beetlebot124](https://discussions.unity.com/u/beetlebot124)
#### Post date: [February 19, 2026, 4:32pm UTC](https://discussions.unity.com/t/problems-with-ui-scaling-on-build/1707646/4 "2026-02-19T16:32:24Z")

</div>

Thanks for the help! I got it by changing it from stretching along the bottom to being center, and then tweaking a few things. I’ve been playing around in different aspect ratios now. Thanks for the help!
