With Unity’s ongoing .NET modernization efforts, I think this would be a great opportunity to revisit how JavaScript interoperability works on the Web platform.
Has Unity considered supporting the modern .NET JavaScript interoperability APIs available through System.Runtime.InteropServices.JavaScript, such as:
It would also be interesting to explore compatibility with Microsoft.JSInterop, including IJSRuntime and IJSObjectReference.
As a Unity Web plugin developer, I believe this could significantly improve the development experience by enabling more natural JavaScript object references, asynchronous interoperability, module imports, and reducing the need for manual marshalling, object handle management, and .jslib boilerplate.
This could also bring Unity Web closer to the broader .NET ecosystem and potentially improve code portability between Unity and other .NET WebAssembly applications.
Is this something Unity has considered as part of its .NET modernization efforts, regardless of the underlying scripting backend used for the Web platform?