Unity Finalizes Move to WebAssembly with the Unity 2018.2 Release

Unity Technologies, a real-time 3D (RT3D) development Platform provider, has completed its move to WebAssembly with the Unity 2018.2 release. In June 2017, ProgrammableWeb reported that WebAssembly had reached cross-browser consensus status, and that all the major browser companies are currently working on designing Wasm as an open standard. Around this time, Unity added support for WebAssembly in Unity 5.6, but it was an experimental feature. With the release of Unity 2018.2, wasm is no longer an experimental feature, and developers can now make wasm-only Builds. Also, the default linker target is now wasm instead of asm.js.

In a recent blog post, the company explains in detail the differences between using wasm and asm.js, and why the decision to move to WebAssembly was made. One difference is the file type; a wasm file is a binary file and an asm.js file is text. Another difference is the code size; the company has built a complex toolchain for transforming C# and C/C++ code to WebAssembly. And this toolchain produces a binary file which allows for smaller builds than you would have with asm.js. One more difference involves memory size; asm.js has a restriction when it comes to Unity Heap size. But WebAssembly provides some flexibility when it comes to memory size.

The company plans on deprecating asm.js in the Unity 2018.3 release. To learn more about WebAssembly support in the Unity 2018.2 release, read the detailed post on the Unity Blog.

Be sure to read the next Games article: Supercell Launches Official ClashRoyale API