Communicating between Javascript and Unity3d -- Part 3

Communicating between Javascript and Unity3d -- Part 3

If you have been following this series, then up until this point, we have built a Unity3d scene, enabled Javascript functions via Emscripten, and hooked the resulting Unity3d build into a VueJS app. Now we come to the part that started this whole journey in the first place — not writing network code in C#.

Our Go server will be using a couple of libraries — the Echo library ( an excellent web framework ) and the Gorilla Websocket library ( an very necessary library that is used in many projects). Take a look at the code to see how everything fits together. And since I am writing this at midnight, I am going to do a tour guide overview of the main things to take away.

Why am I up so late??? I’m old.

Some things that I would to point out, in no particular order:

Hopefully, this sparks your imagination in as far as what you are capable of doing with Unity3d and the web. By embedding your game into a webpage, you can connect your game to a database, the blockchain, or even physical devices.