1
\$\begingroup\$

Alright, I have a bit of a confession to make: I accidentally posted this question in the wrong place: Stack Overflow. Whoops. Anyway, here's my problem. Sorry if you've seen this before. Here's the original post.

I've been struggling with this issue for a few days now. Windows builds for my game work fine, but when I build it to Android, it loads, shows the "made with Unity" screen, then fades to black. Now, I know the next scene (an animated logo) is running because it is playing the audio in real time. However, nothing in the scene is visible. Then, the UI for the in-game loading screen appears. Normally, the game would then load, and it does, but again, the camera thinks there are no sprites in the scene. I can still play the game, and the audio sounds just normal, but I can't see. Then, when I die, the game-over UI appears, and I can use it as normal. The shop-menu works absolutely fine, but the game itself does not. It's as if Unity decided that all SpriteRenderers in the game just didn't exist, and that the camera background color was now black. There are no scripts or animations causing this directly, as it does work in editor and on a PC build. The game also works fine using Unity remote, but the build has the issue. I also made sure that none of the textures were too large for Android (to the point where not one of them is larger than 256x256, which looks terrible but proves a point).

Now, before anyone asks, yes, I have seen the other question on this topic, and no, sadly, it did not help. My camera is set to "solid color", not "don't clear." I tried "skybox" too, just to be safe. I have also tried disabling post-processing, hoping that Android was just unable to handle it. It did nothing. I have even tried entirely disabling all of the sprites in the scene, but even then, the background is still black, indicating that the camera is still not playing nice. Also, here is a screenshot showing the quality settings for the Android build.

\$\endgroup\$
  • \$\begingroup\$ If you want to post this question on a different StackExchange site, please delete the original first. Cross-posting is not allowed on the StackExchange network, and we may need to put your question on hold if you keep it on multiple sites at once. \$\endgroup\$ – DMGregory Mar 16 at 13:41
  • \$\begingroup\$ @DMGregory Thanks for the tip! Sorry about that! \$\endgroup\$ – Koala Squad Mar 16 at 15:29
0
\$\begingroup\$

Assuming you have set all the camera and render setting properly, it could be :

  1. a problem of texture format/compression.

Try experimenting with that in the build settings. I had similar problems when i started, and the solution came through those.

And check if this build runs fine on other devices (with different hardware) or an emulator.

For reference: https://docs.unity3d.com/Manual/class-TextureImporterAndroid.html

  1. Other probable cause could be, that there are too many draw calls w.r.t your device

Same can be checked by running it on different hardware or emulator.

If these does not work, kindly comment...

\$\endgroup\$
  • \$\begingroup\$ I tested it with an emulator, and now I suspect it's just the device rather than my project. Here's the specs for the specific device: productchart.com/tablets/15754 I know for certain that the RAM is within specifications, but I can't tell for the CPU, especially since I've been having issues getting any form of logcat to work. \$\endgroup\$ – Koala Squad Mar 16 at 16:06
  • \$\begingroup\$ Nope, its a GPU issue, your CPU is just fine as the game runs. Try experimenting with texture compression settings (you can get info from google as to what GPUs such as adrino, powervr, etc support which format.) Mark the answer as completed. Good luck \$\endgroup\$ – Yash Mishra Mar 16 at 17:43

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.