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 WebGL game crashing on iOS device

Discussion in 'Web' started by andrej_epicoro, Mar 28, 2023.

  1. andrej_epicoro

    andrej_epicoro

    Joined:
    Feb 6, 2023
    Posts:
    1
    Hi,

    I created this thread one week ago, but it got taken down, because I posted on the wrong forum.

    I am looking for any advice or direction to solving this issue.

    I can't figure out why WebGL game keeps crashing on our iOS device. I searched trough forum and google for a solution and couldn't quite pinpoint the reason for crashing.

    Game crashes both during loading/instantiating addressables and while playing the game. Safari shortly displays "This webpage was reloaded because a problem occurred" and then the website refreshes.
    WebGL game doesn't crash on Android or newer iPhone device.

    Details:
    - iPhone 8
    - iOS 16.3.1
    - Unity 2021.3.18f1
    - WebGL 2
    - Color space - Linear

    We used memory profiler and exported results to Unity 2022 version for more data. It uses around 250MB, up to 300MB.

    upload_2023-3-28_9-34-46.png

    We also tested with Web inspector and Mac device. These are the screenshots:

    upload_2023-3-28_9-28-13.png

    upload_2023-3-28_9-28-33.png

    upload_2023-3-28_9-30-41.png


    Another issue that could be connected with my problem are pixelated shadows. This issue is also present on newer iPhones. Disabling "WebGL via Metal" solves this. Android doesn't have this problem.

    upload_2023-3-28_9-27-44.png
     
  2. unityruba

    unityruba

    Unity Technologies

    Joined:
    Nov 6, 2020
    Posts:
    243
    The good news is that Apple recently fixed a Webkit bug that was causing our applications to crash and that fix landed in: 16.4 beta 3
    https://bugs.webkit.org/show_bug.cgi?id=248768
    The bad news is you'll have to update your iOS version. Sadly there's not much we can do about this from our side.