Thought this would be a simple question but I’ve searched everywhere, save for posting here.
Anywho, trying to upload my game to Simmer.io, which requires a wasm file for uploading except no matter how I configure the build settings in Unity, I end up without a wasm file (I DO get a .asm file, however).
I’ve tried this with Unity 2020 1.3f1 and the latest version of Unity, and I have no idea what’s happening. In player settings, I did notice that I’m building based on WebGL 2.0 graphics API. I’ve searched around and can’t seem to figure this one out.
Heres the build output:
Here are my player settings:
Compile and you will have a new menu in your unity called “Web Assembly” (where you have file,edit,assets ect …)
Click “Web Assembly/Disable Wasm Only” == > compile and you will have both .asm and .wasm
Assets\Editor\WebAssemblyOption.cs(32,45): error CS0619: ‘WebGLLinkerTarget.Both’ is obsolete: ‘WebGLLinkerTarget.Both mode is no longer supported. Instead you can create separate asm.js and WebAssembly builds and download the appropriate one depending on the browser capabilities.’
You can force Unity to build both by editing this line in ProjectSettings.asset file in your Project/ProjectSettings folder: webGLLinkerTarget: 2
0 = asm.js
1 = Wasm
2 = both
P.S. I am not sure, that it is still possible for Unity 2021+, because asm.js is deprecated from this version of Unity.