Search Unity

Unity UI UI text missing on some Android builds

Discussion in 'UGUI & TextMesh Pro' started by TheDreamEXE, Jan 28, 2019.

  1. TheDreamEXE

    TheDreamEXE

    Joined:
    May 14, 2015
    Posts:
    60
    Hey guys, I'm really stumped with this one. So I have some UI elements that vanish in my game's menu on some Android devices (Essential Phone, Galaxy S8 without FHD enabled, and HTC 10 to name a few) but not others. The item in question is that "DeckNumberText" item, and the weird thing is that when I get in game, hit a player, the missing UI elements return until I exit the app. There are other elements that do this as well, but they all return when I attack a player, so for now I'm just gonna focus on the one I have in the screenshot.

    https://gyazo.com/f354060e73c60330b6cf4fd08f28e713


    So here are the weird things that stump me:

    • I've tried changing the Horizontal and Vertical Overflow, and no matter what I change it to, the text still won't show.

    • The text both above and below it in the hierarchy seem to work fine, but the same few elements don't show

    • The camera is set to a fixed orthographic position and the default Z value is at -10, and the DeckNumberText object's Z value is at 0.
    Any ideas as to what to do? I've been at this for ages. Using Unity 5.3.4
     
  2. TheDreamEXE

    TheDreamEXE

    Joined:
    May 14, 2015
    Posts:
    60
    Anyone? I can provide more info as needed. I've been at this for weeks and I have no solution. Someone one Reddit suggested making the text boxes larger and adjusting the scale, but that didn't work. I also tried zeroing out my Main Camera, but that did nothing. Thing is that it works fine on some devices and I can confirm this
     
  3. TheDreamEXE

    TheDreamEXE

    Joined:
    May 14, 2015
    Posts:
    60
    So I've tried deleting and readding all of my text elements, and that fixed the issue for like 25% of phones, but not all of them. Anyone have any ideas?
     
  4. IhaveQuestions

    IhaveQuestions

    Joined:
    Aug 3, 2014
    Posts:
    2
    I know this is old, but I'm replying here in case anyone else ran into this problem, as we did:

    1. We had a canvas with UI elements that were working 100% correctly during tests on PC, Android, and iOS.
    2. We made a change to a canvas by duplicating a button, moving it down, changing the text, and changing the OnClick method. When tested again, it broke on Android. Nothing else was changed, so this was peculiar.
    3. After hours of performing multiple tests, changing out fonts, deleting the copied button and recreating it, hiding parts of the UI, etc, etc... the problem was solved by increasing the size of Height of the Rect Transform on all text elements inside that particular canvas. Why? We still have no idea. But it worked, and it had to be done for all of the text within that canvas.
     
  5. Hobby-Game-Developer

    Hobby-Game-Developer

    Joined:
    Aug 27, 2017
    Posts:
    14
    In my case, suddenly the consola font got lost by changing to a new version of unity. I cried all night.