Why are my GUI Labels distorted on a Samsung S4?

UPDATE3: The issue goes away if I make a simple GUI.Label call first thing during OnGUI(). I detailed my findings in this forum post. If nobody has any suggestions in a day or two, I’ll just mark this question as fixed with the work around, even though I’m still not entirely sure what’s happening, or why my workaround fixes it.

UPDATE2: I got a chance to test and reproduce the issue on a Samsung S3, which was running Android 4.1.2. It’s either something common amongst Samsung devices, or common amongst later Android versions.

UPDATE1: It looks like the issue is either specific to Samsung S4s, or at least the version of Android it runs (4.2.2). I’ve tested the game on 3 other Android devices (older phones and a tablet, all running older Android versions) and have been unable to reproduce this issue. My related suspicion is that the issue is caused by the S4’s resolution, which is significantly larger (1920 x 1080) than any of the other devices.

I’m having an issue where after some seemingly inconsistent activity in my game, GUI.Label calls start displaying distorted text. The user activity is general user input events that cause my code to render different GUI elements to the screen. The following is what I’ve observed:

  • The distortion never happens in the Unity player or in a PC (Win7) build
  • The distortion has not been observed on my Motorola DROID (old, original Android phone)
  • I’ve only observed the distortion when testing on my Android OS Samsung S4
  • The distortion usually looks similar, and I’ve noticed that it often distorts in very similar patterns with slight variations
  • Sometimes, rather than the text being distorted, some or all of the letters in the words won’t render
  • The game never loads with distorted text and only begins to distort the text after user activity
  • The steps that result in distorted text are never 100% consistently reproducible (some times it happens immediately after clicking around, other times it takes a few tries)
  • From the images, you’ll notice that I’m using a function to create outlined text by calling GUI.Label multiple times for the same text. The interesting part is that whatever is distorting the text appears to do so after the outlining function call is made, as it takes entire chunks of the outlined text and distorts it.
  • Once the text is distorted, more of the same user activity that got it into the distorted state will occasionally bring it back to normal
  • I’ve tried rendering the text without the outlining function, but the distortion issue was still observed

To be clear, the first picture I’m attaching is from when the game loads and the text displays normal. The second picture is after the distortion begins.

12184-normal.png

Thanks,
Ross

I can’t figure out why this was happening on a subset of Android platforms, or why calling GUI.Label first to draw a near unnoticeable string (a “.” with very small font) before doing anything else would fix the issue. That being said, it seems to be a workaround, so I’m going with it for now.