Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice

Question Unity Webgl ios Problem

Discussion in 'Web' started by artunduzay, Feb 13, 2023.

  1. artunduzay

    artunduzay

    Joined:
    Feb 13, 2023
    Posts:
    3
    Hello everyone,

    We are creating a webgl project that will work on both desktop and mobile with a group. However, we have been unable to run the project on ios for 2 months now.

    The main project: www.prosoftvr.com/staytest It works seamlessly on desktop.
    The features of the project are:
    Multiplayer
    Video Call / Conference

    However, on ios it stays on the loading screen.
    Video : https://drive.google.com/file/d/1U-HSi9vDbiDUmuJ1LM-Jlzz_U2tP1E72/view?usp=sharing

    When we create the project blank (without any model or video call feature), we can open it on ios.
    Blank project for ios : https://www.prosoftvr.com/iphonetest/

    We are missing something and we can't solve it. Could you please help us? ☹
     
  2. Johannski

    Johannski

    Joined:
    Jan 25, 2014
    Posts:
    824
    You're most likely running out of browser memory - Reloading the page is a very common behaviour if that happens. Sadly the browser memory iOS provides is very limited (e.g. comapred to the memory you get for a native app), therfore you have to be very cautious on where and how to spend memory. Things you should do:
    • Make sure to have optimized textures that only have the resolution they really need
    • I would remove sounds and music for now, until you have a working build again, and then try to add those step by step - For audio Unity 2021.2+ starts to be compressed in memory which does help, but still this is a big overhead
    • Take a snapshot with the memory profiler to see which parts of your application take the most memory - https://blog.unity.com/technology/everything-you-need-to-know-about-memory-profiler
    • You can add an HTML console to catch errors more easily - have a look at this project: https://github.com/JohannesDeml/UnityWebGL-LoadingTest
    • Use addressables and load/unload assets on demand (not an easy task, but worth pursuing in the long run)
     
    artunduzay likes this.
  3. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,401
    it runs on ipad (went to character editor), but does have errors
    - "system out of memory" for textures (lots of them)
    - few missing scripts errors
    - DXT5 compression mode not supported
    - cameracolortarget errors
     
    artunduzay likes this.
  4. artunduzay

    artunduzay

    Joined:
    Feb 13, 2023
    Posts:
    3
    thank you, thank you- i will check these point
     
  5. artunduzay

    artunduzay

    Joined:
    Feb 13, 2023
    Posts:
    3
    thank you, - I'm forwarding it to the team. :)