Search Unity

Bug CanvasScaler - Constant Physical Size doesn't work in Unity 2020 :(

Discussion in 'UGUI & TextMesh Pro' started by petey, Mar 15, 2021.

  1. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,824
    Hi there,

    The setting - Constant Physical Size doesn't work in the canvas scaler in Unity 2020.3 LTS
    I created test scenes going back in Unity versions and the last working one was Unity 2019.4
    Are there any work arounds or other ways to approach this? I really need it to work for part of my project.
    I tried this - https://forum.unity.com/threads/ple...e-constant-physical-size.281161/#post-6644620 and couldn't get that to work either.

    Update - It seems that on anything after 2019.4 LTS, the iPad reports 0 for Debug.Log(Screen.dpi) :(

    Thanks,
    Pete
     
    Last edited: Mar 15, 2021
  2. JuliaP_Unity

    JuliaP_Unity

    Unity Technologies

    Joined:
    Mar 26, 2020
    Posts:
    700
    You mentioned the Canvas Scaler, are you using UGUI with Canvas? If yes this is not the right forum but I can move your post over if you can confirm.
     
  3. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,824
    Oh okay, I thought UGUI was UIToolkit. :)
    I hadn’t realised there was another UI system.
    If you could move it, that would be great thanks.
     
  4. phil-Unity

    phil-Unity

    Unity UI Lead Developer

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    Does it work elsewhere and just not on device? as in the Screen.dpi is wrong?
     
  5. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,824
    Hi! Looks like it’s screen.dpi reporting zero on iPad, it’s fine on other devices that I’ve tested. Also it used to work back in 2019 LTS so somethings gone funny along the way.
     
  6. phil-Unity

    phil-Unity

    Unity UI Lead Developer

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    What you say iPad could you be a bit more specific? There are many different versions which have different handling. Give me a much as you can so i can pass it onto our iOS team.
     
  7. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,824
    Oops sorry!
    iPad Pro (12.9-inch) (4th generation)
    iOS 14.4
    That device should report zero for Screen dpi in anything after 2019 LTS.
     
  8. phil-Unity

    phil-Unity

    Unity UI Lead Developer

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    So good news it was already known about and has been fixed. I'm verifying they are backporting but the "issue" is that the device is too new and hadn't been added to our list of devices with resolutions.
     
  9. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,824
    That’s great! Thanks for the update.