Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Unity WebGL PWA template black screen on Mobile Google Chrome

Discussion in 'Web' started by firepille, Mar 29, 2024.

  1. firepille

    firepille

    Joined:
    May 20, 2018
    Posts:
    5
    I am developing a WebGL App using Unity (2022.3.21f1 LTS). I tested the Progressive Web App Template with a fresh Unity3D project. Try it here:

    https://philjungschlaeger.github.io/PWAtryout/ (Clean Project with PWA Build )

    On most plattforms and browsers the behaviour is fine, the canvas spans the screen according to the window size on mobile and desktop. On Pixel 6a it works fine with firefox and opera browser, but on google chrome it just works fine in landscape mode. But on portrait mode a black screen appears right after the loading screen. Does anyone know how to deal with this? When going to fullscreen, the portrait mode is fine in google chrome.

    https://github.com/PhilJungschlaeger/Wonderland (Fullscreen forcing PWA Build)

    I tried https://forum.unity.com/threads/web...ating-offscreen-fbo-1920x1200-300x150.891103/ and https://forum.unity.com/threads/web...ating-offscreen-fbo-1920x1200-300x150.891103/, but without success. Is there something simple to tweak to make it work?

    Happy for ideas! Thanks a lot!
     
  2. firepille

    firepille

    Joined:
    May 20, 2018
    Posts:
    5
    Ok I found out what the problem was. It only seems to appear on Android, when the display Desktop Site is acitvated and the phone is in portrait mode. I accidently checked it earlier and didn't uncheck it.