

jslib files on the docs, but digging the WebGL forum, you’ll hear about. wasm file and the *.framework.* file (contains the WASM Module JavaScript code).

The samples there are mostly to show the possibilities, some features and options are missing. Unity docs have a manual page with basic stuff, like how to send a message to the page, or how to send a message from the page. WebAssembly or WASM, a binary-code format that can run on modern browsers.Īnd from time to time I might mention WebXR, which is a standard for running AR/VR experiences on the web. emscripten has a port of this library, and Unity use it in some ways to more easily port their code to WASM. SDL, Library designed to provide a hardware abstraction layer for computer multimedia hardware components. emscripten is a toolchain that enables C/C++ code to run on the web using WebAssembly. Wait wait wait, there were lots of name drops here.

And for input/output Unity uses SDL which has a port for emscripten. In the past Unity compiled the code using emscripten to ASM.JS and now it mainly compiles the code using emscripten to WebAssembly. Yes, Unity does use WebGL to render the projects, but the code is not compiled to WebGL, as WebGL is only a graphical library for rendering. In this article, I’ll demonstrate some tricks I used for communication / interoperability between the web page and the Unity WebGL build, demonstrated using my repository.įirst, what is Unity WebGL? I think that Unity WebGL should actually be named Unity Web. Through my work at Resonai in the last couple of years on Web AR, and by working in my personal time on the WebXR Export Unity package, I learned some of those. Unity WebGL exists for a few years now, but there are still some less known features and options. Or Tricks and Tips for Unity WebGL and WebAssembly.
