Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Fixing game scaling in various aspect ratio

Discussion in '2D' started by Tigro, Jun 15, 2019.

  1. Tigro

    Tigro

    Joined:
    Apr 25, 2014
    Posts:
    58
    I have a simple 2D puzzle game which I've been creating with 16:10 aspect ratio set in the game panel. It's still far from finished but I decided to make it work with other resolutions first and herein lies the problem.

    The game looks like this in 16:10 portrait but like that in 18:9 portrait. Everything chages place, the game area gets cropped out. How do I set it up to work with this (and other) aspect ratios without explicitly stating placement for each and every aspect ratio I could think of? I'd just like the main play area to always be the largest square that could fit in the screen, placed at top of the screen, the GUI to go on the bottom and the two colored panels (next colors) to go between them - like shown in the 16:10 screenshot.

    How do I do it? I'm using an ortographic camera if that matters.
     
  2. LivDominus

    LivDominus

    Joined:
    Aug 13, 2018
    Posts:
    5
  3. Tigro

    Tigro

    Joined:
    Apr 25, 2014
    Posts:
    58
    Thanks but isn't that more for raycasting and stuff like that than resizing specific game elements?