Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Everything becomes white on Android.

Discussion in 'Android' started by fordicus, Jul 15, 2022.

  1. fordicus

    fordicus

    Joined:
    Apr 12, 2022
    Posts:
    2
    Hello all, I needed some advice to resolve my issue.

    The game that I am currently developing works fine on Windows, and then I started working to bring this to Android devices. On Android, almost everything becomes just white as you can see in the figure below. The problem does not appear in the simulator but only happens on actual Android devices that I tested. Therefore, there must be some wrong settings in the project.

    I am aware that there have been similar reports and attempts to fix it in their situations, but I didn't get lucky with the existing ideas. What I tried so far follows:

    *I am using the universal render pipeline (URP) which does not have an issue on Windows.

    Project Settings >> Player >> Other Settings
    - Color Space: {both Gamma and Linear do not fix the problem}
    - Auto Graphics API {both On and Off do not fix the problem}
    - Graphics APIs {both OpenGLES2 and OpenGLES3 do not fix the problem}

    I previously had a global volume and post-processing, but turning them off did not work out.
    I change the lighting setting all to the default, but still no luck.

    I also use "Generate Mip Maps" and "Use Crunch Compression" for textures. I tried turning them off for an object which should appear in front of the camera, but nothing changes.

    I have one directional light in the scene. I just tried setting the intensity to zero, but it does not give me a meaningful insight.

    In some existing threads in the Unity forum, it can be a MIP map issue if the behaviour depends on the distance from the camera. That is the reason why I did an experiment with different distances in the figure below. In the figure in the middle, we're supposed to see the figure at the top that appears in the Unity simulator. I brought the camera close enough to the character, then we only see the character at the bottom figure. Hmm, that appearance of the character happens when it is being occluded by something (my camera for layer 1). It has something to do with the distance, but not what I can imagine from MIP maps.

    I have three cameras with different layers: 0, 1, and 2. However, I think the issue has nothing to do with this as everything works fine on Windows, no?

    Could you please give some ideas on how to handle the situation?

    Thanks a lot.


    Top: On Unity simulator with arbitrary target devices. It shows what is supposed to be.
    Middle: On actual Android devices (Galaxy Mobile A32 5G and Galaxy Tablet SM-P550)
    Bottom: On actual Android devices. Different distance between the cameras and the objects (compared to Middle).
     
    Last edited: Jul 15, 2022
  2. fordicus

    fordicus

    Joined:
    Apr 12, 2022
    Posts:
    2
    I found the solution. I leave the answer here for somebody who's been suffering from the same issue.

    The relevant keywords are: Camera - Render Type: Overlay, Clear Depth, and Multiple Cameras

    https://forum.unity.com/threads/white-screen-in-android-build-not-in-editor-fixed.466714/
    https://blog.theknightsofunity.com/using-multiple-unity-cameras-why-this-may-be-important/
    https://forum.unity.com/threads/no-camera-clear-flags.785204/

    Update: But then, the separate layer for particles is occluded by the default layer...
     
    Last edited: Jul 15, 2022