Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

All UI Text is Black

Discussion in '5.2 Beta' started by Claytonious, Aug 22, 2015.

  1. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    550
    Upgraded to 5.2f1 and all UI text in the game is now solid black. Even creating a new UI Text and trying to change its color leaves it rendering as black.

    Downloading f2 right now to see if it's already fixed, but is anybody else experiencing this?

    This is in the editor, haven't built to device yet, on Mac OS X, with target platform set to Android.
     
  2. Alex-Lian

    Alex-Lian

    Guest

    There was an issue in a merge of UI work regarding Best FIt.
    Should be fixed in f2.
     
  3. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    550
    OK, I finally got f2 installed and I still had this black text issue in my project.

    So I created a new project to submit a bug report with as a minimum repro case, but in a brand new project with f2 I do not have this problem - I can change text colors again.

    So now it looks like simply having my project in that f1 build has broken something. How can I force my existing project to behave nicely like a new f2 project does and forget the evil that was visited upon it by f1? Reimport all assets? Delete the Library folder? I'll try a few things...
     
  4. ScottyB

    ScottyB

    Joined:
    Apr 4, 2011
    Posts:
    131
    According to the upgrade guide that is linked in the release notes section here: https://unity3d.com/unity/beta

    UI
    In 5.2 we have combined the shaders that text and normal UI element rendering users.. A side effect of this is that if you specify a manual font texture in a 32bit format then the color channels will be honored. This means that black texture channels will result in black text where previously the text would be white (we only looked at the alpha). If you wish to use custom textures for your fonts do one of the following:
    1. Change the import format of the texture to A8. This will only keep the alpha component and Unity will generate the text as white by default.
    2. Specify a color / colors in the texture for Unity to use when rendering the text
     
  5. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    550
    Nothing seems to help. This project always show all UI text in black. Filed a bug with the complete project as case #721884.

    @ScottyB, all of the texture settings look completely normal. None of these text objects where white before upgrading to F1. That's when they turned black (without changing any of their font or texture settings). Now, after upgrading to F2, they are *still* all black, no matter what I select for their color. I've reimported all assets, etc. No luck.
     
  6. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    550
    Manually assigning a new material to all UI Text's solves the problem. It's just a default material with the UI/Text shader on it. I don't know why this is necessary - apparently the default material you get when having nothing assigned is what's broken?
     
  7. Onialonn

    Onialonn

    Joined:
    Mar 13, 2014
    Posts:
    13
    Unity 5.2f3, Same issue. And interface totally broken (children canvases with parent matrix?).
     
    Last edited: Sep 9, 2015
  8. Onialonn

    Onialonn

    Joined:
    Mar 13, 2014
    Posts:
    13
    Any chance to fix black text?
     
  9. VisualTech48

    VisualTech48

    Joined:
    Aug 23, 2013
    Posts:
    240
    Is there a fix to this? Its really an issue.
     
    Onialonn likes this.
  10. Onialonn

    Onialonn

    Joined:
    Mar 13, 2014
    Posts:
    13
    No one was able to solve this problem?
     
  11. saledren

    saledren

    Joined:
    Oct 6, 2012
    Posts:
    3
    I solved that this way:

    1. Make new material
    2. Set shader in that material to "UI/Default Font" (without any parameter changes, leave without texture)
    3. Apply that new material to every text component (Hierarchy > search > by type > text, select all and apply material)

    After that, all texts get colors.
     
  12. VisualTech48

    VisualTech48

    Joined:
    Aug 23, 2013
    Posts:
    240
    Thanks man!
     
    NewYorkHOK likes this.