Author Topic: Black sprites and no font rendering after Unity 5.3.4?  (Read 1539 times)

vexe

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 153
    • View Profile
Black sprites and no font rendering after Unity 5.3.4?
« on: July 22, 2016, 02:16:59 PM »
Hi,

On Android, we're having a weird issue where if we build our game with any version of Unity above 5.3.4 we get visual bugs where UI sprites are all black and no fonts render on the screen. We use the latest NGUI. Weird thing if you run the game once it works fine, but if you force-close and reopen the glitches appear, if you restart they disappear, if you restart again they reappear, etc.



Unity forums thread crosslink for adb logs and more details: http://forum.unity3d.com/threads/black-sprites-and-invisible-fonts-after-5-3-4-using-ngui.417661/

Any ideas what's wrong?

[EDIT]: Seems like setting the max atlas texture size to 2kx2k fixed it for one of our games. But we have another game that we tried building (same NGUI, same Unity, same texture settings etc) that still shows black textures.
« Last Edit: July 22, 2016, 04:54:04 PM by vexe »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: Black sprites and no font rendering after Unity 5.3.4?
« Reply #1 on: July 24, 2016, 06:43:14 AM »
Black means Unity either failed to create or released the texture. Using large textures on devices that don't support would be one example where this can happen. Keep an eye on how much GPU memory your app is using too.

vexe

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 153
    • View Profile
Re: Black sprites and no font rendering after Unity 5.3.4?
« Reply #2 on: July 25, 2016, 08:36:27 AM »
Thanks for the reply.

Are there any other cases than large textures that could cause this? It happened on two games, in one game we set the max texture size to 2k and it worked, in the other it didn't. And, this only happens when we're building from Unity 5.3.4 and beyond, anything below that everything works fine, even if the max atlas texture size was 4k! Any idea what's going on there?

r.pedra

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 20
  • Posts: 131
    • View Profile
Re: Black sprites and no font rendering after Unity 5.3.4?
« Reply #3 on: July 25, 2016, 09:05:09 AM »
I had one case, after loading a new scene.
If the memory of the phone is saturated, and you load a new scene, all is black after scene loading. Try reduce memory usage. You can compress your atlases at max supported compression, and retry to display your scene. If the compression fixes the problem, it is likely a memory problem