Forum rules - please read before posting.

UI appearing outside screen on ultrawide monitors

I don't know if I'm doing something fundamentally wrong, or misunderstanding this concept.

But I've ticked the box "fixed ratio" in camera settings and chosen 1.78, as this corresponds to 16:9. I then test-play my game in that aspect ratio in Unity, to get the correct image.
When I draw the Unity UIs, in canvas scaler I choose 1600 x 900 as the reference resolution, and then scale with screen size.

Still when one tester plays, all the dialogue options, which are displayed with a Unity UI, appear far outside the screen. He has an ultra wide monitor with what I'm guessing has a 21:9 ratio.

Is there something I'm missing?

Comments

  • If your Menus rely on Unity UI, a little more work is needed to have them conform to the given aspect ratio.

    This is typically just a case of attaching and configuring the Auto Correct UI Dimentions. The Manual chapter of the same name has details on its usage - but if you share screenshots of the Menu in question I can give more specific advice.

  • I have to say the whole UI thing is very confusing. But here are some screenshots of my settings, and the results:

    Here's the UI prefab


    The panel, which I use as rect transform, it also has a transparent image component.


    How it looks in 16:9, and how it should look


    How it looks in 21:9

    This is all without checking the auto correct UI dimensions, because I don't understand the settings, so I don't wanna meddle with it blindly.

    All of the other settings are a bit greek to me, including the canvas scaler, so I've basically just experimented around until it looked right on the most common resolutions.

    But what should I put in the anchor min/max in the auto-correct window to make it work for 21:9?

  • You should first change the Panel's alignment and pivot to the left edge, so that it always covers the left edge without overlapping the top/bottom edges (of the natural screen, not the AC-enforced one).

    To do this, go to the Panel's RectTransform, click the alignment icon, and then shift-click the lower-left one (Left/Stretch). This'll force it to be aligned to the left edge:

    Then, attach the Auto Correct UI Dimensions to the root, check Update position?, and set the Min/Max anchor points to (0,0) (0,1).

    For a similar example, see the default InventoryUI prefab - it aligns itself along the top screen edge, rather than the left, but the principle is the same.

  • Working wonderfully (as always with your support!) :)

  • edited May 16

    Nevermind this, solved the problem!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.