WebGL Development build initial memory too small

Hi, I’m trying to made development build, but unity keeps throwing this error:

Building Library\Bee\artifacts\WebGL\build\debug_WebGL_wasm\build.js failed with output:
wasm-ld: error: initial memory too small, 39128944 bytes needed

Is there any way to increase initial memory?

Normal build is working, but i can’t use profiler with that :confused:

Just write this code in the editor script and execute it, and you’re done

public class Custom
{
    [MenuItem("Custom/MofifySetting")]
    private static void ModifySetting()
    {
        PlayerSettings.WebGL.emscriptenArgs = "-s TOTAL_MEMORY=256MB -s --profiling-funcs";
    }
}

You need to fill in a capacity greater than what you need and ensure it is a power of 2, like 64 128 256

You can also in this file
YourProject/ProjectSettings/ProjectSettings.asset
Search for this line

webGLEmscriptenArgs: -s TOTAL_MEMORY=256MB -s --profiling-funcs

Modify the memory size within it