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

Canvas scaler doesn't scale my UI

Discussion in 'Editor & General Support' started by phoda, Nov 13, 2019.

  1. phoda

    phoda

    Joined:
    Nov 11, 2014
    Posts:
    384
    Okay so I've been googling for last hour and found nothing but old GUI references and topics that were for updated Unity UI only had tutorials how to setup but nothing with my problem.

    I have set game window to custom 1920x1080 resolution. I have set canvas scaler to reference resolution 1920x1080 and match height or width to 0.5. My UI element is game object with 1880x60 size (rect transform), it has text component that fits to that object.
    When i run in editor and change resolution to anything else, canvas scales and is okay but any element inside it was not affected. Object still had size 1880x60.

    Why it doesn't even attempt to scale objects. Other objects are same, just stays same.
     
  2. phoda

    phoda

    Joined:
    Nov 11, 2014
    Posts:
    384
    Okay I realized that keeping the resolution in same ratio like 16:9, screen will stay same however if i change to 16.10, it breaks, shouldnt matching width and height at 0.5 deal with this automatically?