psygames/UnityWebSocket
psygames/UnityWebSocket has 1,213 GitHub stars and 228 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-09 07:43 UTC. Last push 2025-09-16.
:whale: The Best Unity WebSocket Plugin for All Platforms.
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README_EN.md
Original
Online Demo
Quick Start
Requirements
- Unity 2018.3 or higher.
Installation
Install via Package Manager (Recommended)
Open Window/Package Manager in the Unity menu bar, click the
+icon at the top left, selectAdd package from git URL..., enterhttps://github.com/psygames/UnityWebSocket.git#upmand confirm.Install via Unity Package
Download the latest version of
UnityWebSocket.unitypackagefrom the Releases page, then import the package into your project.
Usage
Easy to use
// the namespace using UnityWebSocket; // create instance string address = "ws://echo.websocket.org"; WebSocket socket = new WebSocket(address); // register callback socket.OnOpen += OnOpen; socket.OnClose += OnClose; socket.OnMessage += OnMessage; socket.OnError += OnError; // connect socket.ConnectAsync(); // send string data socket.SendAsync(str); // or send byte[] data (suggested) socket.SendAsync(bytes); // close connection socket.CloseAsync();For more usage, refer to the UnityWebSocketDemo.cs example code in the project.
Menus
- Tools -> UnityWebSocket, version update check, bug report, etc.
Unity Define Symbols(Optional):
UNITY_WEB_SOCKET_LOGOpen internal log info.
Explore related projects
freeCodeCamp/freeCodeCamp
freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.
458,814 starsdonnemartin/system-design-primer
Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.
377,430 starsreact/react
The library for web and native user interfaces.
252,441 starsvuejs/vue
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
212,623 stars