Skip to content

cakeslice/FishyWebRTC

Repository files navigation

WebRTC transport plugin for FishNetworking

You can now use UDP in the browser with FishNetworking!

Both Reliable and Unreliable channels are supported by this transport

Based on Bayou and SimpleWebTransport

Limitations:

  • Clients cannot be tested in Unity Editor, it only works in WebGL builds
    • This is because the WebRTC client is built with JavaScript and is not implemented for other platforms
  • Only WebGL is supported for clients
    • You can use UDP on other platforms with a Multipass transport
  • There's no P2P support and host mode doesn't work
  • HTTPS support for the initial connection (signaling) to the server is not implemented
    • You can still use HTTPS with a reverse proxy
  • The server can be built for most platforms but only Linux Dedicated Server build has been tested

Installation:

  • Add https://github.com/Unity-Technologies/com.unity.webrtc.git#3.0.0-pre.5 using the Package Manager (Add from git URL)
    • For now only 3.0.0-pre.5 is supported
  • Add ENABLE_WEBRTC to define symbols in Player settings
  • Copy this folder to Assets/FishNet/Runtime/Transporting/Transports/
  • Modify the assembly definition Assets/FishNet/Runtime/FishNet.Runtime.asmdef to include the SimpleWebRTC assembly:

example_assembly

  • Add the FishyWebRTC transport component and use it in your TransportManager:

example_component

About

WebRTC transport plugin for FishNetworking

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published