Portrait Mode Canvas On Landscape View

You should be able to get a large portion of the way there with a top-level Portrait RectTransform with an AspectRatioFitter on it. Set the AspectRatioFitter to 0.7 and Fit Inside Parent, then stick all your portrait canvas stuff in there.

You actually might even be able to put the AspectRatioFitter right on your existing root portrait-shaped RectTransform and be done with it.

Then for the edges, do whatever: stick another canvas behind it, or make a skybox, or just drop a full-screen sprite back there… or 3D… whatever you like.

Here’s more reading:

Here are the official docs on how to make your UI handle various resolutions and aspect ratios cleanly:

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