2 ms·
As I am not a Unity developer, I thought the differences between US and JS were superficial and I wasn't aware they're incompatible in that degree. UnityJS seem
by forgotpwd16 7y ago
As I am not a Unity developer, I thought the differences between US and JS were superficial and I wasn't aware they're incompatible in that degree. UnityJS seems interesting. What is its status? Is it a draft or usable already?
- DonHopkins 7y agoUnityJS is open source, and I've been using for various projects and developing it actively, most recently on WebGL. Here's the original github repo: https://github.com/SimHacker/UnityJS https://github.com/SimHacker/UnityJS I recently refactored that monolithic repo into a bunch of smaller nested repos, to make it much more modular and layered, so that different projects for different platforms can pick and choose which modules to use. Here is the root repo of the new version: https://github.com/SimHacker/UnityJS_UnityJS_Deployment_WebGL https://github.com/SimHacker/UnityJS_UnityJS_Deployment_WebG... I'm still in the process of documenting how to install it (now that you have to wrangle git submodules it's tricker), and how to use it (there are a lot of moving parts, and different platform specific pieces). But here is some high level stuff: Anatomy.txt: https://github.com/SimHacker/UnityJS_UnityJS_Deployment_WebGL/blob/master/doc/Anatomy.txt https://github.com/SimHacker/UnityJS_UnityJS_Deployment_WebG... Architecture.txt: https://github.com/SimHacker/UnityJS_UnityJS_Deployment_WebGL/blob/master/doc/Architecture.txt https://github.com/SimHacker/UnityJS_UnityJS_Deployment_WebG... InterestingFiles.txt: https://github.com/SimHacker/UnityJS_UnityJS_Deployment_WebGL/blob/master/doc/InterestingFiles.txt https://github.com/SimHacker/UnityJS_UnityJS_Deployment_WebG... (Some of the paths in the above file have changed in the name of modularity.) Since Unity insists that you put different kinds of files in certain fixed directories like StreamingAssets (for all the .js files and web content) and WebGLTemplates (for the WebGL wrapper that loads your JavaScript code), you can't make a module with one single github repo that has different sub-directories that would straddle the fixed Unity directories. (And symbolic links don't work on all platforms, so you can't fudge it.) So it is necessary to split some modules up into different repos, so the one with C# code can go into Libraries, and the one with JavaScript code can go into StreamingAssets, and the one with the html wrapper can go into WebGLTemplates. Here's the repo with all the C# code and resources: https://github.com/SimHacker/UnityJS_UnityJS_Library https://github.com/SimHacker/UnityJS_UnityJS_Library For example, here's the C# side of the JavaScript/C# bridge: https://github.com/SimHacker/UnityJS_UnityJS_Library/blob/master/Scripts/Bridge/Bridge.cs https://github.com/SimHacker/UnityJS_UnityJS_Library/blob/ma... Here's the repo with all the latest UnityJS JavaScript code: https://github.com/SimHacker/UnityJS_UnityJS_StreamingAssets https://github.com/SimHacker/UnityJS_UnityJS_StreamingAssets And here's the JavaScript side of the JavaScript/C# bridge: https://github.com/SimHacker/UnityJS_UnityJS_StreamingAssets/blob/master/bridge.js https://github.com/SimHacker/UnityJS_UnityJS_StreamingAssets... Send me email if you want to know more! I'm happy to answer questions and help you get it working, and to hear your feedback, which will help me write more and better documentation.