Search Unity

[Unity 5.2.2] wrong UI text color (all black)

Discussion in 'Unity UI (uGUI) & TextMesh Pro' started by henkjan, Nov 4, 2015.

  1. henkjan

    henkjan

    Joined:
    Aug 1, 2013
    Posts:
    119
    I have a strange problem after upgrading to Unity 5.2.2:

    My project has 3 scenes: Initializer; Navigation; Main
    In the editor it doesn't matter which scene I start. I will always load the Initializer first (using some code).
    When the editor's current scene is Navigation (before running) and I run the project the text color of all the text is correct (see correct.jpg).
    But when the editor's current scene is Main and I run the project, the text color for all the text is black! (see wrong.jpg)

    I've googled it and someone suggested the create a new material with the UI/Default Font shader without touching the parameters, and assign it to all the text. I've tried this, but it didn't help.

    UPDATE:
    Looks like it is only happening in the Unity Editor. I've tried building a stand alone version and there the text color was correct.
     

    Attached Files:

    Last edited: Nov 5, 2015
  2. henkjan

    henkjan

    Joined:
    Aug 1, 2013
    Posts:
    119
    Nobody has the same problems?
     
  3. matt_relentless

    matt_relentless

    Joined:
    Aug 12, 2014
    Posts:
    8
    We have this same problem. The problem occurs on iOS, Android, Xbox One and PS4 builds too. Has it been fixed in 5.2.2 patches?
     
  4. matt_relentless

    matt_relentless

    Joined:
    Aug 12, 2014
    Posts:
    8
    Henkjan, we found a solution to this. Check to see if you have a shader in your project called "UI/Default" or "UI/DefaultFont". This is now overriding the built in font shader. Rename this to something else "UI/DefaultInternal" and restart unity.

    This should fix the problem
     
  5. henkjan

    henkjan

    Joined:
    Aug 1, 2013
    Posts:
    119
    Matt, I've searched my project but I don't have a shader that is called UI/Default or UI/DefaultFont. Also I have tried to fix it by creating a new material and using the UI/Default Font shader (which Unity is providing) and add this to all my Text components. But this doesn't fix it either.
    By the way I'm running the newest patch 5.2.2p3 and tried a build for Android without the problem. So it looks like it's only happens in the editor.
     
    Last edited: Nov 10, 2015
  6. brendan-vance

    brendan-vance

    Joined:
    Jan 16, 2014
    Posts:
    36
    We've been having this issue with our project as well; I've tried a whole bunch of things (including the stuff in this thread from the beta forum) and thus far have been unable to resolve it.

    It's worth noting that we brought our project over from 4.6, and developed all the UI stuff back then. Has anyone experienced this with a brand new Unity project?
     
  7. henkjan

    henkjan

    Joined:
    Aug 1, 2013
    Posts:
    119
    I've also updated it from Unity 4.6 unfortunately
     
  8. henkjan

    henkjan

    Joined:
    Aug 1, 2013
    Posts:
    119
    I found the problem. I'm using Advanced Additive Scenes that does this :-(