Unity logo
Cancel
Cart
Applications
Sell Assets

Over 11,000 five-star assets

Rated by 85,000+ customers

Supported by 100,000+ forum members

Every asset moderated by Unity

Home
Tools
Network
This content is hosted by a third party provider that does not allow video views without acceptance of Targeting Cookies. Please set your cookie preferences for Targeting Cookies to yes if you wish to view videos from these providers.
1/5
SimpleWebRTC is a Unity-based WebRTC wrapper that facilitates peer-to-peer audio, video, and data communication over WebRTC using Unitys WebRTC package and websockets.
Render pipeline compatibility
The Built-in Render Pipeline is Unity’s default render pipeline. It is a general-purpose render pipeline that has limited options for customization. The Universal Render Pipeline (URP) is a Scriptable Render Pipeline that is quick and easy to customize, and lets you create optimized graphics across a wide range of platforms. The High Definition Render Pipeline (HDRP) is a Scriptable Render Pipeline that lets you create cutting-edge, high-fidelity graphics on high-end platforms.
Unity VersionBuilt-inURPHDRP
6000.0.41f1
Compatible
Compatible
Compatible
6000.0.31f1
Compatible
Compatible
Compatible
Description

SimpleWebRTC is a Unity-based WebRTC wrapper that facilitates peer-to-peer audio, video, and data communication over WebRTC using Unitys WebRTC package https://docs.unity3d.com/Packages/com.unity.webrtc@3.0/manual/index.html. It leverages WebSockets for signaling and supports both video and audio streaming.


A tutorial YouTube video can be found here: https://www.youtube.com/watch?v=-CwJTgt_Z3M


Simple Installation

  1. Make sure, that the required dependencies are installed (TextMeshPro, Unity WebRTC, NativeWebSocket (https://github.com/endel/NativeWebSocket)).
  2. Go to the Unity AssetStore page: https://assetstore.unity.com/packages/slug/309727
  3. Install the package via Unity AssetStore.

Installation using the releases page

  1. Got to the releases page and download the latest release from https://github.com/FireDragonGameStudio/SimpleWebRTC/releases
  2. Make sure, that the required dependencies are installed (TextMeshPro, Unity WebRTC, NativeWebSocket (https://github.com/endel/NativeWebSocket)).
  3. Import the package into your Unity project.

Installation using Unity Package Manager

  1. Create a new Unity project
  2. Open the Package Manager, click on the + sign in the upper left/right corner
  3. Select "Add package from git URL"
  4. Enter URL: https://github.com/endel/NativeWebSocket.git#upm and click in Install
  5. After the installation finished, click on the + sign in the upper left/right corner again
  6. Enter URL https://github.com/FireDragonGameStudio/SimpleWebRTC.git?path=/Assets/SimpleWebRTC#upm and click on Install

Manual Installation

  1. Clone the repository: git clone https://github.com/FireDragonGameStudio/SimpleWebRTC
  2. Open the Unity project in the Unity Editor.
  3. Ensure that the required dependencies (such as TextMeshPro, Unity WebRTC and NativeWebSocket) are installed.

Usage of WebRTCConnection Component


The WebRTCConnection component manages the WebRTC connection and can be attached to a GameObject in Unity.


Following sample scenes are included in the pacakge:

  • WebSocket-TestConnection: For testing the wecksocket connection separately.
  • WebRTC-SingleClient-STUNConnection: Testing STUN connection for a single client. Works standalone and can be deployed to clients. Make sure to set the LocalPeerId for each client individually.
  • WebRTC-SingleClient-wLobby-STUNConnection: A simple Lobby example for handling multiple STUN WebRTC clients. SimpleLobbyManager.cs shows an example, how to use SimpleWebRTC via C#.
  • WebRTC-MultipleClients-STUNConnection: Shows how multiple clients can be connected via peer-to-peer connections and share data, video and audio transmissions.

Example code

WebRTCConnection connection = gameObject.GetComponent<WebRTCConnection>();

connection.Connect(); // Establish WebSocket connection


// after a WebRTC peer-to-peer connection is established

connection.StartVideoTransmission(); // Begin video streaming

connection.SendDataChannelMessage("Hello Peer!"); // Send a message over the data channel


For further information check https://github.com/FireDragonGameStudio/SimpleWebRTC


Technical details
  • WebRTC peer-to-peer connection management
  • WebSocket-based signaling
  • Video and audio streaming
  • Data channel communication
  • Logging and debugging tools

SimpleWebRTC

(not enough ratings)
5 users have favourite this asset
(5)
FREE
118 views in the past week
License type
File size
2.7 MB
Latest version
1.1.0
Latest release date
Mar 20, 2025
Original Unity version
6000.0.31
Support
Visit site
Quality assets
Over 11,000 five-star assets
Trusted
Rated by 85,000+ customers
Community support
Supported by 100,000+ forum members
Unity logo
Language
Feedback
Partners Program
Partners
USD
EUR
Copyright © 2025 Unity Technologies
All prices are exclusive of tax
USD
EUR