Forum rules - please read before posting.

UI fit within screen

Hello.
We're using Cinemachine camera and it seems that UI function "Always fit within screen" doesn't work. Any advice where to dig to fix it?

UI.png
UI3.png

Comments

  • Are you enforcing an aspect ratio, or building to mobiles? The Auto Correct UI Dimensions component is likely not necessary if not.

    Though, the component is set to align with the bottom of the screen - the Max Anchor Y would need to be set to 1 for a freely-positionable Menu.

    AC will reposition the Menu, and account for the screen edges, with the RectTransform boundary - Boundry in this case. Check that this is in the centre of your Canvas, and only covers the visible portion of the UI underneath it.

  • Yes, we build Mobile and enforcing ratios
    Aspect ratio: Range,
    Minimum aspect ratio: 1.33 [iPad],
    Maximum aspect ratio: 2.66 [Ultrawide],

    Do we need the panel's boundary to set RectTransform boundary?

    For example, we have Conversation UI, which placed in lower right corner and using next setting we were able to place it correctly:
    Min anchor point: X = 1 Y = 0
    Max anchor point: X = 1 Y = 0

    But our Subtitles UI is being placed above speaking character so we don't know the anchor point and the Subtitle panel can be moved beyond the screen.

  • edited June 3

    The RectTransform boundary, which is used by the component by default, should be set to the Canvas's immediate child, and should span the visible area that the UI covers.

    For free-moving Menus, that don't have a fixed position, uncheck Update position? in the component.

    For an example, see the default HotspotUI prefab that's used by the Hotspot menu in AC's default interface. You can view it by using the New Game Wizard to create a new game, and setting the Default interface option to Unity UI.

  • Thank you, it helped
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.