Hi guys,
I built a plugin for Unity WebGL to support WebRTC for my online game. It allows players to connect directly to each other via udp. I wonder if people are interested in using something like that or if there are already other solutions out there?
I think about uploading the plugin into the asset store after some bugfixing/cleanup. Anyone interested?
The interface is quite simple. You can start a server or connect to one. If you create a server you get a connection id which can be used like an ip address. The client can use the servers id to connect and use two channels: one reliable and one unreliable.
Only problem is the system needs you to setup a server that helps creating the end to end connection between two users. Socket.io/websockets or firebase will be supported.
I would also like to connect it to the UNET high level api but I guess there is no interface for that?!?!
You can give it a try here:
http://testank.4science.co/testankgl
Choose a name, click private server and then use the link below the player (work around as copy/paste in the player won’t work) to invite another player/open it in a second browser window.
There is still one problem: If the game isn’t visible in the browser the connection stops responding. Not sure if that is unity, the browser or a bug on my side. So for testing locally you need to make sure both windows with the game are visible.