Skip to content

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

Stars

Watchers

Forks

Contributors

Languages