Skip to content

StinkySteak/NetickWebRTCEmbeddedTransport

Repository files navigation

Overview

Utilizing WebRTC as a transport for Netick. Allowing Developers to Utilize DTLS (Secure UDP) for WebGL and Native platform!

If you are new to WebRTC, check out the resources section down below

Features

Feature Description Status
Native Support Based on the Unity WebRTC supported platform Beta
WebGL Support WebGL acting as a client Beta

Installation

Prerequisites

Unity Editor version 2021 or later.

Install Netick 2 before installing this package. https://github.com/NetickNetworking/NetickForUnity

Dependencies

  1. UnityWebRTC 3.0.0-pre-8 (Core functionality)
  2. SimpleWebTransport (As Signaling Server) (UPM: https://github.com/James-Frowen/SimpleWebTransport.git?path=source)
  3. FlexTimer
  4. Newtonsoft Json Unity

Steps

  • Open the Unity Package Manager by navigating to Window > Package Manager along the top bar.
  • Click the plus icon.
  • Select Add package from git URL
  • Enter https://github.com/StinkySteak/NetickMultiplexTransport.git
  • You can then create an instance by double clicking in the Assets folder and going to Create > Netick > Transport > NetickWebRTCTransport

How to Use?

API Description
Timeout Duration Define how long timeout will be called upon failed to connect
ICE Servers URLs of your STUN/TURN servers

HTTPS/WSS Support

Enable ConnectSecurely on the transport then, do one of these:

  1. Through Reverse Proxy (Recommended)
  2. Through SSL Certificate

Technical Design

  • This implementation of WebRTC is a little different from the others, where we run the Signaling server inside unity itself.

Seperate Process

Preview

Inside Unity

Preview

Inside Unity Seperate Process
More in control Difficult to be controlled
Running host is not supported in browser Running host may supported in browser
Require Port forward the Signaling server Port forward can be handled by the cloud
Less overhead More overhead
Recommended for Dedicated Server Recommended for Client Hosted

Resources to learn WebRTC

About

WebRTC transport for Netick, with signaling server embedded

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published