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

Question How to fit UI to screen size?

Discussion in 'Editor & General Support' started by MoosaNasir, Oct 9, 2021.

  1. MoosaNasir

    MoosaNasir

    Joined:
    May 24, 2021
    Posts:
    33
    Hello, I have a problem with UI in unity. Currently, this is how the UI looks in HD resolution:
    upload_2021-10-9_18-12-14.png
    Which is perfect and just the way I want it. But when we change the screen size to something different like free aspect it looks like this:
    upload_2021-10-9_18-15-10.png
    Is there a way to scale the UI objects to fit the screen size?

    My Canvas Scaler Component looks like this:
    upload_2021-10-9_18-16-21.png
    Thanks in advance!
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,779
  3. triple_why

    triple_why

    Joined:
    Jun 9, 2018
    Posts:
    46
    I'd suggest setting Screen Match Mode at Canvas Scaler Component to Expand.