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. Dismiss Notice

Infamous blurry text problem CONFIRMED as bug, not limitation.

Discussion in 'UGUI & TextMesh Pro' started by Helix_Snake, Mar 17, 2016.

  1. Helix_Snake

    Helix_Snake

    Joined:
    Feb 23, 2016
    Posts:
    13
    Every single response to this question on the internet (which get asked a HELL of a lot, because it is a seriously common problem) says "buy a $60 asset to fix it" or "scale your text down, and increase the font size!" (which is extremely inefficient) and say things like "It's a limitation of Unity's text system" but I just proved that is false. It's a bug. Why? Because under SOME conditions, the text DOES scale correctly!

    I noticed that my pause menu was extremely blurry but the text on my on-screen HUD was fine. After testing every individual thing about the canvas scaler and the text for about an hour, I basically confirmed it had nothing to do with the settings of either of those. Then I realized the main difference between the HUD and pause menu is that the HUD is not disabled when the game starts.

    So as a test, I moved the code that disables my pause menu and other UI to a coroutine function and ran it a fraction of a second after the game starts. Now everything scales correctly, even if you disable and reenable the canvases to hide/show the menus.

    The best part is, if you set the time to wait before the coroutine runs to 0, it will SOMETIMES be blurry and SOMETIMES be crisp, entirely at random. If you do at the very start (in an objects start() function) it will always be blurry.

    I honestly can not believe that this bug has been in for so long (since the new UI was introduced!) but now that I've confirmed it's a bug, I hope to see it fixed. I apologize if it has already been fixed, I couldn't find it in the patch notes.
     
  2. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    If you think it is a bug, please file a bug report.
     
  3. Helix_Snake

    Helix_Snake

    Joined:
    Feb 23, 2016
    Posts:
    13
    I filed a bug report right after typing this topic, but I made the topic because many people who know about this problem seem to think it's an engine limitation and not a bug. It can't be an engine limitation if the text DOES scale correctly under certain conditions, with no settings changed.
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,795
    Well let us be the judge of that ;)
    Do you have a bug id?
     
  5. Helix_Snake

    Helix_Snake

    Joined:
    Feb 23, 2016
    Posts:
    13
    I sent a bug report without my project because I felt like that might make things too complicated, I now realize that might have been a bad idea and have submitted a new bug report with my project and am waiting on the email back.

    Edit: Case 780705, is that what you wanted?
     
    Last edited: Mar 18, 2016
    karl_jones likes this.
  6. NirmalNishanth

    NirmalNishanth

    Joined:
    Jun 22, 2015
    Posts:
    3
    There is a Solution , increase your font size to 1024 (HD) or higher and work with the Character size to bring your text size Down.
     
  7. Zaflis

    Zaflis

    Joined:
    May 26, 2014
    Posts:
    438
    Just want to say that Unity doesn't use the set size 25 on this for sure. It looks more like size 8:

    blurry_font.png
     
  8. Myrmidonas

    Myrmidonas

    Joined:
    Aug 22, 2012
    Posts:
    1
    I believe that Unity doesn't take into account the dynamicPixelsPerUnit value when Canvas is disabled. I resolved this issue by setting the aforementioned value higher than 1 whenever the Canvas gets enabled. I'm also waiting for a fix on this!
     
  9. Big-Ed

    Big-Ed

    Joined:
    Mar 28, 2015
    Posts:
    14
    What worked for me is not only setting the Canvas.enabled=true, but also turning the CanvasScaler.enabled=true.
    design the panel and then disable the canvas and canvasscaler. When u want to show it you turn both on and the text is crisp., when you close the panel, disable both.

    Pattern is -
    OpenPanel()
    myCanvas.enabled=true
    myCanvaScaler.enabled=true

    ClosePanel
    myCanvaScaler.enabled=false
    myCanvas.enabled=false