Skip to content

Instantly share code, notes, and snippets.

View mtrive's full-sized avatar

Marco Trivellato mtrive

View GitHub Profile
@mtrive
mtrive / EnableThreads.cs
Last active September 11, 2022 07:07
Unity Editor script to enable WebAssembly multithreading
using UnityEditor;
using UnityEngine;
[InitializeOnLoad]
class EnableThreads
{
static EnableThreads()
{
PlayerSettings.WebGL.linkerTarget = WebGLLinkerTarget.Wasm;
PlayerSettings.WebGL.threadsSupport = true;