Is there a better way?

There’s a few parts here… I do that red “inset a little bit” on almost 100% of my games. It’s super easy.

Instead of this:

9215370--1286052--Screen Shot 2023-08-12 at 6.37.12 AM.png

Do this:

9215370--1286055--Screen Shot 2023-08-12 at 6.37.15 AM.png

And for that inset:

  • use the preset fullscreen size, but hold down SHIFT and ALT to also set pivot and position and anchors all at once.

  • now key in the “insets”… like this:

9215370--1286058--Screen Shot 2023-08-12 at 6.38.40 AM.png

Then just position and anchor entirely within your little “inset.”

You can put insets in your insets, or mix insets with AspectRatioFitters with “Fit Inside”

Here’s more random reading:

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

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.

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

1 Like