Forum rules - please read before posting.

Force Aspect Ratio and UI Menu

edited November 2017 in Technical Q&A
I have compiled my first scene and I noticed a little problem.
I would like to use the Force aspect ratio option but that is what happens:
Unity does not take into account the presence of black bands above and below but rather considers the entire window (both full screen and windowed) as the game scene.
So if the resolution does not require black bands the inventory appears full at a certain distance from the bottom, differently it remains covered in part by the black bands.
By disabling the Aspect Ratio option, the problem seems to be resolved.
Do you have any idea to fix issue?

Comments

  • Please provide screenshots when describing visual problems.

    Have you checked Always fit within screen? in the Menu's properties, and have you defined an appropriate RectTransform boundary?
  • Yes, Alwais fit within screen is checked. 
    Perhaps it depends on some UI menu setting?




  • edited November 2017
    If the Menu's Position type is Manual, then AC won't touch it - any repositioning has to come through either the UI settings or from a custom script.

    However, the Menu class's SetCentre function accounts for the UI within the boundary of the screen:

    using UnityEngine;
    using System.Collections;

    public class MenuPositionTest : MonoBehaviour {

        public Vector2 position;
       
        void Update () {
            AC.Menu menu = AC.PlayerMenus.GetMenuWithName ("InGame");
            menu.SetCentre (position);
        }
    }

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.