Search Unity

Problem with 2D game on android. Random FPS drop with OpenGLES 2.0, sudden white screen with Vulkan

Discussion in 'General Graphics' started by roointan, Jan 3, 2019.

  1. roointan

    roointan

    Joined:
    Jan 8, 2018
    Posts:
    78
    I'm having a problem with my 2D game on Android.

    When I use OpenGLES 2.0 as the graphics API, I experience sudden FPS drops in the game. The game starts to slow down sometimes randomly, And it can drop down to 25 FPS sometimes (from 60). I tried debugging it, and nothing special was consuming CPU time or anything.

    it was only GFX.Waitforpresent.

    To fix this, I tried using Vulkan as the first Graphics API, and the other two OpenGLES APIs next. The problem of FPS drop is gone! never slows down again on my device.

    But I had two other problems.

    The first is the screen suddenly turn all white. This is again random! can't reproducde it easily. But it does happen. And when this happens sound can be heard and it's obvious the game is running, and it's just not rendering properly.

    The other problem is game won't start on an old device a friend tested it on.

    I've been testing this on my Huawei P10 Lite device with Android 8.