Last active
September 11, 2022 07:07
-
-
Save mtrive/01374844278d2ec377c7f6bbc4df4e6a to your computer and use it in GitHub Desktop.
Unity Editor script to enable WebAssembly multithreading
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using UnityEngine; | |
[InitializeOnLoad] | |
class EnableThreads | |
{ | |
static EnableThreads() | |
{ | |
PlayerSettings.WebGL.linkerTarget = WebGLLinkerTarget.Wasm; | |
PlayerSettings.WebGL.threadsSupport = true; | |
PlayerSettings.WebGL.memorySize = 512; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://docs.unity3d.com/Manual/webgl-gettingstarted.html?_ga=2.109275973.1583158693.1621219018-33883919.1599712015