- Home /
Unity Android: sprites appearing as black squares
I tested my game in many devices and it runs ok, but someone who tried it in an 「Asus EeePad Transformer」 reported seeing the sprites as black squares.
I'm using SpriteManager (freely available in the Unity Wiki) to control the sprites. Basically all it does is to render the all sprites in billboards in the same mesh to save drawing calls. For the sprites, I have a 4096x4096 sprite sheet with automatic compression, using the Mobile/Particles/Alpha Blended shader.
The game is: https://play.google.com/store/apps/details?id=com.stdho.lavagirl
Unfortunately I don't have that device so I can't debug it. Anyone has any hint/idea of why this could be happening in that specific device?
Answer by cregox · Nov 29, 2012 at 08:36 PM
Most tablets don't support 4096 textures (only newest ones will do). Set it to 2048 and you're good to go. And set it to 1024 if you want to be sure it will work in any device.
I haven't tried, but here are some pointers on how to check what your device support: http://stackoverflow.com/questions/8573178/limitation-on-texture-size-android-open-gl-es-2-0
Really? I made a game with all textures in 4096 and I have no problem...
@paulaceccon Well, it so happened on my tests with Samsung Galaxy Tab 10.1 ... But on further research, 4096 is just highly unsupported. Only newest devices do support it. I did guess and was hoping to not be corrected, but thanks for bringing it up! ;-)
Thank you so much for this insight. I was about to try and rewrite and debug a big pile of code when I saw this. You saved about 3-4 hours of my life. I just lowered the texture size and everything worked.
Answer by MADmarine · Nov 09, 2012 at 01:20 PM
When building, what texture compression are you using?
Might be worth looking at some of the issues that arise with certain types of compression:
http://docs.unity3d.com/Documentation/Manual/android-GettingStarted.html