Search Unity

Unity 2020.1 PlayerSettings.WebGL.memorySize Deprecated or Active

Discussion in 'Web' started by stonstad, Aug 21, 2020.

  1. stonstad

    stonstad

    Joined:
    Jan 19, 2018
    Posts:
    659
    I'm building a WebGL player and it looks like PlayerSettings.WebGL.memorySize is not a no-op as documentation claims it to be (https://docs.unity3d.com/ScriptReference/PlayerSettings.WebGL-memorySize.html).

    I was setting it in 2019.x builds, which was required then. In 2020.1 I'm now seeing a runtime error which shows the value is still set:

    Has anyone else seen this behavior? I'm going to try unsetting it by assigning a memorySize value of 0.
     
  2. stonstad

    stonstad

    Joined:
    Jan 19, 2018
    Posts:
    659
  3. stonstad

    stonstad

    Joined:
    Jan 19, 2018
    Posts:
    659
    This could be a Chrome limitation. This script shows 2080MB as the max memory size.

     
  4. stonstad

    stonstad

    Joined:
    Jan 19, 2018
    Posts:
    659
     
  5. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    Unity now by default dynamically expands the memory as needed but I think there is still a hard limit at 2Gb