Skip to content

⚙️ Prototype tool that converts WebIDL JavaScript specs into C# code for Unity, linking Web APIs directly through WebAssembly 🚀

License

Notifications You must be signed in to change notification settings

Rufus31415/WebIDL2Unity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebIDL2Unity

WebIDL2Unity is a prototype of a powerful tool designed to automatically convert JavaScript API specifications written in WebIDL format into C# code for Unity.

For example, it can take a web specification (like this URL : WebXR) and generate the corresponding Unity-compatible C# bindings, as shown in this repository: WebXRDeviceAPI for Unity.

This project is not an empty shell — when you compile your Unity project and call the generated C# functions (which mirror the JavaScript APIs defined in the WebIDL), those calls are executed directly in JavaScript through the WebAssembly layer produced by Unity’s WebGL build.

WebIDL2Unity demonstrates how the gap between web-native APIs and Unity scripting can be bridged seamlessly, making it possible to integrate advanced browser APIs into Unity projects without manually writing glue code.

This is a concept and an open exploration. If you’re interested or motivated to collaborate, discussions and contributions are more than welcome!

About

⚙️ Prototype tool that converts WebIDL JavaScript specs into C# code for Unity, linking Web APIs directly through WebAssembly 🚀

Topics

Resources

License

Stars

Watchers

Forks