Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Editor UI Scaling

Discussion in 'Editor & General Support' started by Mike171, Aug 3, 2019.

  1. Mike171

    Mike171

    Joined:
    Aug 3, 2019
    Posts:
    2
    Hi,
    I was wondering if there is any way to scale the UI elements of the Unity Editor?
    I found similar threads but I'm hoping to avoid changing my Windows App Scaling.
    I'm using a standard HD display (1920x1080) and the 'Create' button is only like 16px high... it took me a good 30 seconds to get my mouse in the right spot to click it!

    Here's a rough image of what I mean (forgive the very rushed Photoshopping):


    Is something like this possible?

    Thanks,

    Mike.
     
  2. 2019.3
    upload.PNG

    Although the Create button:
    upload1.PNG
     
    timothywwcase and Mike171 like this.
  3. Mike171

    Mike171

    Joined:
    Aug 3, 2019
    Posts:
    2
    Aahh beauty, I'm using 2019.2, that's why I couldn't find it.
    Thanks for the help mate!
     
  4. Edco

    Edco

    Joined:
    Dec 6, 2013
    Posts:
    16
    Unity 2019.3.0b12
    This specific "UI Scaling" option does not show up in Preferences... I'm on a Mac, is this a Windows only feature? A Pro version only feature?
     
    hgnagh likes this.
  5. hgnagh

    hgnagh

    Joined:
    Jan 31, 2020
    Posts:
    1
    Same here, I am also using 2019.3 on a mac and don't have that option in preferences.
    I am using a 4k monitor and am scaling the whole screen through the OS. While Unity also scales accordingly, the text is still approx. 1 scaling level smaller than in all the other applications and I have yet to find a way to fix this.

    Anyone got the same problem?
     
  6. Edco

    Edco

    Joined:
    Dec 6, 2013
    Posts:
    16
    As of 2019.3.3, still missing in Mac OS, but PC collaborators confirm the option on their end.

    The usability factor of the small UI text on hi-res monitors should not be underestimated, I sincerely hope Unity addresses for Mac OS soon.
     
  7. TruongNguyenTungDuy

    TruongNguyenTungDuy

    Joined:
    Oct 27, 2017
    Posts:
    13
    Can we get the current scaling value in UI Scaling preferences via script?
     
  8. danix

    danix

    Joined:
    Nov 15, 2013
    Posts:
    29
    Unity 2019.3.12f1. Editor UI Scaling is also missing from the menu, using Linux ( PopOS ). The UI is very small without the scaling!
     
    Pnvanol and GrassWhooper like this.
  9. tgrushka

    tgrushka

    Joined:
    May 21, 2020
    Posts:
    1
    I am legally blind and getting into game programming. Really sad that UI scaling is missing from 2019.3.15f1 Personal. I'm on a MacBook Pro running Catalina. Love the scaling feature in Blender. Would be really great if the Unity folks could just make this work on Mac ... or how can I hack it to turn it on in a script or something? Thanks.
     
  10. In 2019.3 there is a menu point in the Edit/Preferences.../UI Scaling/Use custome scaling value where you can select from multiple values from 100% to 350%. Also make sure that the Use default desktop setting checkbox is off.
    I'm not sure how this preferences window accessible and how is it working on OSX, on Windows it's quite okay (I'm using on 150%).

    Is this still missing on OSX?
     
  11. Hendrik-Mans

    Hendrik-Mans

    Joined:
    May 31, 2013
    Posts:
    22
    Yes, including the 2020.1 Beta. :'(
     
  12. Curlicue

    Curlicue

    Joined:
    Apr 22, 2019
    Posts:
    2
    Still not in 2020.2.0a13
     
  13. phamphong1412

    phamphong1412

    Joined:
    Sep 11, 2017
    Posts:
    1
    still not exist in 2020.1.2f1 pro version. Mac Os Catalina 10.15.4
    Please support this. My eyesight goes down from 10 to 8 after 4 years working with unity :(
     
    Dan2013 and ngoanrazor like this.
  14. rgrlee71

    rgrlee71

    Joined:
    Sep 11, 2012
    Posts:
    37
    Why wouldn't they do the scaling in smaller increments? Like 110%? Some of us just need a small bump to see comfortably, 125% is ridiculous at 2560x1080, it's a pain to fit everything in. WTH uses 350%?
     
    GDevTeam and mgreene like this.
  15. uMathieu

    uMathieu

    Unity Technologies

    Joined:
    Jun 6, 2017
    Posts:
    396
    350 is used by people that do demos on large projection screens or screen sharing with zoom, I agree it can't really be used for real work.

    Pro-tip: use the command-line argument to specify any value:
    Unity.exe -ui-scale 110
     
  16. Nickpofig

    Nickpofig

    Joined:
    Oct 25, 2018
    Posts:
    5
    That does not work on Linux. Any solution for Linux users?
     
    Pnvanol likes this.
  17. uMathieu

    uMathieu

    Unity Technologies

    Joined:
    Jun 6, 2017
    Posts:
    396
    It's only available on windows at the moment.
     
  18. HjorthBjorn

    HjorthBjorn

    Joined:
    Aug 12, 2013
    Posts:
    21
    Bumping an older thread here but this is the first thing I looked for when opening the software on my 5K iMac screen. What is the plans for MacOS support?
     
  19. mimiCryMuffin

    mimiCryMuffin

    Joined:
    Oct 23, 2015
    Posts:
    11
    MacOS 1440p external monitor.
    For Scale UI just need to do that trick: https://github.com/usr-sse2/RDM/releases
    Add HiDPI for your monitor resolution, restart macOS - and it's work well (because by default macOS don't scale system UI to external monitors - "great apple")
    Unity Editor UI will scale the same as macOS
     
    ramand likes this.
  20. GrassWhooper

    GrassWhooper

    Joined:
    Mar 25, 2016
    Posts:
    108
    still hopping for linux/mac support for this feature, unity, most certainly, is straining the eyes, with out the scaling.
     
    ramand and mike_hotchkiss like this.
  21. StanataL

    StanataL

    Joined:
    Nov 4, 2020
    Posts:
    1
    The below should double the scale of the editor on Linux (from terminal):

    env GDK_SCALE=2 ./UnityHub.AppImage


    Works well in KDE Plasma on a 4K monitor. Unfortunately, only integers are supported at the moment.
     
    Pnvanol and AlMartson like this.
  22. Dan2013

    Dan2013

    Joined:
    May 24, 2013
    Posts:
    200
    I am a Mac user.
    Still not see the "UI Scaling" option in Unity 2020.3.2f1(LTS) :(

    Any update for this?
    @uMathieu
     
    Last edited: Mar 31, 2021
  23. mimiCryMuffin

    mimiCryMuffin

    Joined:
    Oct 23, 2015
    Posts:
    11
    go to use RDM for that
     
    Dan2013 likes this.
  24. Dan2013

    Dan2013

    Joined:
    May 24, 2013
    Posts:
    200
    Thanks. However, I still think this is a temporary solution that reduces the global resolution to make all text bigger?
     
  25. mimiCryMuffin

    mimiCryMuffin

    Joined:
    Oct 23, 2015
    Posts:
    11
    setUp needed HiDPI resolutions for make all text bigger - it's don't reduces your global resolution.
    for example: I work on external monitor with 1440p resolution, using RDM I added 1600x900(HiDPI/retina) profile for my monitor, after that you start Unity and all text is clearly and bigger on 1440p resolution (but system render it in 3200x1800(that take performance) => you receive it on your 1440p(or other resolution) monitor)

    to be fair actualy I use 720p HiDPI for my 1440p monitor - because I like this scale factor for Unity and VS code, but you can use any scale factor like: 900p HiDPI, 1080p HiDPI etc - you just need enable HiDPI for that
     
    Last edited: Feb 14, 2022
    Dan2013 likes this.
  26. Dan2013

    Dan2013

    Joined:
    May 24, 2013
    Posts:
    200
    I see. I tried it. The 1280x800⚡️ is good without reducing the resolution on my monitor. Thanks!

    However, we are still waiting for an official solution in Unity itself. @uMathieu
    Changing the global resolution setting of Mac still leads to some unwanted side effects.
     
    Last edited: Apr 25, 2021
  27. AlMartson

    AlMartson

    Joined:
    Jan 23, 2018
    Posts:
    2
    Thank you @StanataL for sharing this, it really looks neat in big 4k Screens.


    Nevertheless, If you have a smaller Monitor, with an Resolution bigger than 720p ( > 1280x720 px) but still smaller than 4K, then you might see that this option (2x Scale) does not allow you to work efficiently. We need some intermediate values, right?

    The alternative solution I found is based in using the xrandr command, to change the Resolution in a Launcher for the Unity3D Application.

    Cons
    :
    * The Image might look a little Pixelated, Blurry.
    * Your Desktop Icons will probably be moved to a random position while you use this new Resolution... (but they will still be there in your Desktop, don't worry). Remember how to invoke your Terminal-CLI with the Keyboard...

    Pros:
    * You will have and intermediate Resolution, using the Unity3D Editor.
    * You can revert to the Original Resolution, if you follow my advice in the end of this Post.


    My two cents:

    If you are in Xubuntu, (or in any Linux Distribution using Xfce), you might try changing the Display/Screen Resolution just before starting Unity3D or UnityHub (in a Launcher or in a Bash script), using the xrandr command.
    After its execution the code could restore the Resolution to its Default value.

    The example below worked in my specific case (WARNING: you might want to copy in a piece of paper your Original Normal Resolution, before trying this, as it will move all your Desktop Icons to the Left, and it might really bother you if you placed them in some special form... Also some Icon in Horizontal Panels coud be innacesible, due to the fact that the Screen will be smaller and they will not fit in. Try this at your own risk, as it could make a mess in your Desktop, and have in your mind the command to open your Terminal Window (i.e.: CTRL + ALT + T) and a way to open the Display/Screen Menu (without using the Mouse, only the Keyboard) beforehand, because you might not see some Launcher icons until you restore the Resolution to its Default):

    1- First, find out your current 'Display Res', and your possible Resolution candidates, using the commands taken from [ https://www.tecmint.com/set-display-screen-resolution-in-ubuntu/ ] and using the Xfce GUI Menu: 'Display'

    2- Then copy the value in a piece of paper: In my case my Monitor is called (by the System): eDP-1-1 . Original Resolution: 1920x1080 @120.00 Hz.
    Fixed Resolution, in which Unity3D looks nice and functional: 1280x720 @ 60.00 Hz

    3- Create a Xfce 'Launcher', in which you change the Resolution to a desired number that makes Unity3D look Good (you need to make some tests to decide, so you could write the code in a Terminal Window,... see... and finally decide) I personally use some Terminal code inside a Menu Shortcut Launcher, but I don't recommend you to just copy-paste my example, because you need your Monitor's name, and the Available Resolutions to make it work.

    Example (Terminal / CLI commands):

    Code (JavaScript):
    1. xfce4-terminal -e 'bash -c "xrandr --output eDP-1-1 --mode 1280x720 --rate 60.00   ;    /Path/to/your/UnityHub.AppImage   ; bash"' -T "Window Title: Unity3D - Terminal  [ UnityHub Launcher ]  --->  RESOLUTION eDP-1-1 1280x720 @ 60.00"
    And after finishing my work with Unity3D, I run this Terminal commands in order to Restore my original Screen/Display Resolution,
    (in fact, I also made a Launcher out of this code, to make my life easier in any case I want to restore the original values):

    Code (JavaScript):
    1. xrandr --output eDP-1-1 --mode 1920x1080 --rate 120.00
    ...
    4- And, all this could go in a single line in the Launcher, restoring the Display Resolution in the end to its Original values AFTER you close: 'UnityHub.AppImage' (I mean: the new Resolution will persist, even if you close your current Unity3D Project, in this example; so to restore the Resolution to its Defaults you would need to close the Unity Hub, specifically).
    So... a 'better' (and final) command could be:

    Code (JavaScript):
    1. xfce4-terminal -e 'bash -c "xrandr --output eDP-1-1 --mode 1280x720 --rate 60.00   ;    /path/to/your/beloved.../UnityHub.AppImage     ;    xrandr --output eDP-1-1 --mode 1920x1080 --rate 120.00    ; bash"' -T "Terminal Window Title: Unity3D - Terminal  [ UnityHub Launcher ]  --->  RESOLUTION eDP-1-1 1280x720 @ 60.00 Hz"

    You could even write a Bash Script with all this.
    I hope this helps somebody.

    Have a Happy Day Coding & Gaming.
    Peace.
     
    Last edited: Jul 15, 2021
  28. UselessGameDev

    UselessGameDev

    Joined:
    Jul 15, 2018
    Posts:
    3
    Hi, sorry to bump this up, but I was searching for this myself and I ended up finding it in Unity's C# Reference:
    It's used in the preference window like this:
    Code (CSharp):
    1. private int CurrentEditorScalingValue
    2. {
    3.     get {return Mathf.RoundToInt(GUIUtility.pixelsPerPoint * 100); }
    4. }
    It's thus declared in GUIUtility like so:
    Code (CSharp):
    1. [NativeProperty("GetGUIState().m_PixelsPerPoint", true, TargetType.Field)]
    2. internal static extern float pixelsPerPoint { get; }
    However, like many other useful Unity features, it is an internal property and thus "cannot" be accessed from script.

    You can access it using reflection like so:
    Code (CSharp):
    1. Type utilityType = typeof(GUIUtility);
    2. PropertyInfo[] allProps = utilityType.GetProperties(BindingFlags.Static | BindingFlags.NonPublic);
    3. PropertyInfo property = allProps.First(m => m.Name == "pixelsPerPoint");
    4. float pixelsPerPoint = (float)property.GetValue(null);
    5. Debug.Log(pixelsPerPoint);
    It works fine by me I use it because
    Screen.width
    in Editor ImGUI doesn't give me scaled values and my custom tools were all messed up.

    Keep in mind there probably is a reason Unity didn't make this field public, use at your own risk.

    Cheers.
     
    AlMartson likes this.
  29. kalchenko-no

    kalchenko-no

    Joined:
    Nov 3, 2021
    Posts:
    1
    Sorry, I'm new to Unity can you explain how to use code you have published?
     
  30. Gibibit

    Gibibit

    Joined:
    Jan 25, 2017
    Posts:
    3
    Bump. Unity on Linux is basically unusable to me until there is some DPI scaling.
     
    themaize and PixelLifetime like this.
  31. owain_rich

    owain_rich

    Joined:
    Jun 20, 2016
    Posts:
    6
    I found some great code for changing the font size of Unity's UI. It's a usable workaround for me on Mac until we have a similar UI scaling option to the Windows version. Thanks to Nukadelic for making this available on github. Just download his script, drop it in an Editor folder in your project and then go Window>Editor Font Size. There's a global font size setting as well as the ability to change individual UI elements:

    https://gist.github.com/nukadelic/47474c7e5d4ee5909462e3b900f4cb82
     
    ramand likes this.
  32. ArnaudValensi

    ArnaudValensi

    Joined:
    Jul 22, 2015
    Posts:
    3
    I'm also on linux and cannot use Unity because of this problem. That't sad :'(
     
    PixelLifetime and chopin1998 like this.
  33. ArnaudValensi

    ArnaudValensi

    Joined:
    Jul 22, 2015
    Posts:
    3
    This works for me:

    env GDK_SCALE=2 GDK_DPI_SCALE=0.5 /home/arnaud/Unity/Hub/Editor/2020.3.23f1/Editor/Unity -projectPath ~/path/to/project

    but the top menu text is now to big, so we can add GDK_DPI_SCALE=0.5 to scale it down:

    env GDK_SCALE=2 GDK_DPI_SCALE=0.5 /home/arnaud/Unity/Hub/Editor/2020.3.23f1/Editor/Unity -projectPath ~/path/to/project

    If some of the editor text is still too big, we can download the following script anywhere in the Assets folder and go to "Window/Editor Font Size" to decrease the global size a bit:

    https://gist.github.com/nukadelic/47474c7e5d4ee5909462e3b900f4cb82

    Here is the alias I made:

    alias open-project='nohup env GDK_SCALE=2 GDK_DPI_SCALE=0.5 /home/arnaud/Unity/Hub/Editor/2020.3.23f1/Editor/Unity -projectPath ~/path/to/project >/dev/null 2>&1 &'

    I wish it will help.
     
  34. norappmob

    norappmob

    Joined:
    Dec 8, 2021
    Posts:
    1
    This work for me in OpenSuse Leap 15.3.
    Thanks ArnaudValensi.
     
  35. Diman119

    Diman119

    Joined:
    Jul 21, 2020
    Posts:
    2
    Thanks for recommending this. It`s a pretty good script, but it was a bit buggy for me.
    I wrote my own tool for resizing fonts based on it, that saves all changes to a config file and automatically reloads them on Unity startup or when they are reverted to defaults by Unity.

    Here it is: https://gist.github.com/Diman119/223fbaf376d88a8adc234d095c040ce4

    I hope it helps.
     
    ramand, chelnok, Aerohazker and 2 others like this.
  36. clang2

    clang2

    Joined:
    Jan 27, 2018
    Posts:
    9
    Props to all the workarounds. It's kind of sad that Unity devs don't seem to care enough about accessibility to add UI scaling/font size configuration as a standard option when just about every decent IDE out there has such an option.
     
    NeedsLoomis and mimiCryMuffin like this.
  37. Dan2013

    Dan2013

    Joined:
    May 24, 2013
    Posts:
    200
    Still no official solution?
    It is 02/2022 now :(
     
    mimiCryMuffin likes this.
  38. AlenLap

    AlenLap

    Joined:
    Dec 7, 2013
    Posts:
    13
    Wow thank you! This is a great work-around till Unity is able to add it natively!
     
  39. AlenLap

    AlenLap

    Joined:
    Dec 7, 2013
    Posts:
    13
    Could you add the ability to scale the project folder icons? Everything else is great but those damn icons still are microscopic.
     
  40. Dan2013

    Dan2013

    Joined:
    May 24, 2013
    Posts:
    200
    Just downloaded the 2021.3 on my Mac
    the UI scaling is still not an option on it :(
     
  41. morphex

    morphex

    Joined:
    Dec 18, 2012
    Posts:
    112
    Oh, this is such a needed feature. Glad we have some work arounds, from someone who just moved from windows to linux. Its one of those thigns you take for granted almost/
     
    Aerohazker and vidocco like this.
  42. piekz

    piekz

    Joined:
    Jan 2, 2022
    Posts:
    1
    +1
    just moved to mac from windows, 1440p uwqhd, barely usable unless you hug the screen. the windows feature for ui scaling is great, please carry it over :)
     
    mimiCryMuffin likes this.
  43. Pnvanol

    Pnvanol

    Joined:
    Jan 11, 2016
    Posts:
    114
    where is the unityappimage folder?
     
  44. xAdamQ

    xAdamQ

    Joined:
    Jul 23, 2016
    Posts:
    53
    doesn't exist on mac/Linux until now, this is ridiculous tbh, that is a core feature for high res screens!
     
    PixelLifetime and mimiCryMuffin like this.
  45. xAdamQ

    xAdamQ

    Joined:
    Jul 23, 2016
    Posts:
    53
    I have solved this issue on Manjaro by installing plasma-wayland-session and choosing Wayland from the lock screen, which will scale unity to follow system scale.
     
  46. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    I'm on macOS and I'd like to scale the UI and text size smaller.
     
  47. chopin1998

    chopin1998

    Joined:
    Jan 29, 2019
    Posts:
    20
    2022 Aug, still no good solutiion on Linux......
     
    PixelLifetime and mimiCryMuffin like this.
  48. chopin1998

    chopin1998

    Joined:
    Jan 29, 2019
    Posts:
    20
    good news, but i use xfce4....
     
  49. xAdamQ

    xAdamQ

    Joined:
    Jul 23, 2016
    Posts:
    53
    it is not ideal anyway, because fractional scaling makes the editor blurry, all other applications I use has scaling build in, except for unity
     
    mimiCryMuffin likes this.
  50. PineappleHaus

    PineappleHaus

    Joined:
    Sep 18, 2022
    Posts:
    2
    I think the most insulting factor here is that a company with 1.2 billion in annual revenue which boasts that 50% of all games are developed with their platform can't find the time to fix an issue that is at least mostly remedied by a 244 line script after years of people complaining.

    I went ahead and installed the 2022.2.0b8 Beta and the 2023.1.0a10 Alpha; Neither have UI scaling. I am so incredibly disappointed.
     
    Last edited: Sep 19, 2022
    nayyden, aparsh123, djfran86 and 8 others like this.