Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Question When I run a WebGL build application in Unity, my computer crashes after about 10 minutes.

Discussion in 'Web' started by unitsume, Aug 16, 2023.

  1. unitsume

    unitsume

    Joined:
    Oct 7, 2022
    Posts:
    31
    Hello.

    I have a question about WebGL.
    When I run a WebGL build application in Unity, my computer crashes after about 10 minutes.
    The application only displays one cube and one plane.
    I want to create an application that can run on both high and low spec computers.
    What kind of tricks do I need?

    Is there a published minimum computer spec for running Unity's WebGL?

    Please share your wisdom.
    thank you.
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    7,263
    What does „my computer crashes“ mean? There are a number of misconception what a crash is, so please describe exactly what is happening on your screen and what you need to do to resolve it. If it requires a hard reset this would commonly be referred to as a computer crash or freeze. If you can still do ctrl+alt+del to bring up task manager this isn‘t a crash.

    What‘s your spec? Not meeting specs should not cause a crash after 10 minutes. It will either not work at all, work incorrectly, or crash outright. I‘m thinking that your computer is simply overheating and locks up to prevent damage to components. There are numerous reasons for this behaviour, if the machine has aged and was never cleaned it could be as simple as dust blocking fans or thermal paste dried up.
     
  3. unitsume

    unitsume

    Joined:
    Oct 7, 2022
    Posts:
    31
    Thank you for always helping me.

    My explanation was poor. I'msorry.

    The computer I use the Unity Editor on works fine in the browser.
    However, on another low-spec computer, opening the application in the browser forces the computer to shut down.

    I want to create a WebGL application that can run on both high-spec and low-spec computers.
    However, I think WebGL won't work if your computer specs are too low.

    I want to know two things.
    1. Minimum and recommended specs to run WebGL.
    2. Candidates for functions that support low-spec PCs
     
  4. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    7,263
    Like I said: if it works but stops working after some time it‘s an issue with that particular computer!

    The min spec for WebGL is quite simply: a browser that supports WebGL. If the browser is unable to create the WebGL context you‘ll get an error message saying so, something like „content could not be loaded“.

    The best you can do at this point is to ensure you are using URP as this will allow for better framerate on lower spec systems. And then just keep testing and profiling as you work on the app. But first fix the issue with the test system, eg clean it (if it‘s not a notebook) and make sure you have the latest drivers installed and test on different browsers. For example Firefox currently shows significantly worse performance in my postprocessing-heavy tests compared to Chrome.