简体   繁体   中英

Can .NET DLLs be created using Javascript or JScript.NET?

I'm creating a video game that has single player and multiplayer. The single player is done in C# (Unity), and want to use Gamesparks BaaS that works on Javascript (NodeJS) for their server code.

Since I want the multiplayer server to be authoritative, I need the server code to run Javascript and the client will run C#, which means duplicated code

But, if I can create .NET dlls in Javascript I can reduce code duplication heavily by using those libraries in Unity and using the Javascript code on the server.

Thanks!

If you want to use javascript (and by javascript I mean nodejs), along with c# and communicate between those two, you can use electron-edge. It helps you to run c# code using nodejs through Electron API.

Here is the link of their Github url: Electron-Edge-documentation

You can also interact with dlls, using an creating your application as an electron app. You refer this question where you will find some more details regarding it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM