A Unity networking module and server for XR-powered Location Based Entertainment
A minimal, high-performance networking package for Unity — built specifically for location-based entertainment (LBE) experiences. STYLY NetSync includes an easy-to-integrate Unity package and a lightweight Python server to make real-time, synchronized XR sessions easy to build and deploy in venue networks.
Highlights
- Super easy to use — simple API and drop-in package so you can integrate fast and get running with minimal setup.
- Super lightweight — low CPU / memory footprint; optimized network traffic for stable performance on local networks.
- Optimized for LBE — syncs virtual and physical transforms and offers Human Presence (collision avoidance).
- Avatar Transform Synchronization
- RPC (Remote Procedure Call)
- Network Variable
- One-click SDK setup for HMDs
- Multifunctional XR Rig
- Battery level management
Some features are provided via dependent package STYLY XR Rig.
uv/uvx: Required to start the server. OpenUPM: Required only when you add the package to your Unity project.
# Windows
winget install -e --id OpenJS.NodeJS.LTS --source winget
winget install -e --id astral-sh.uv --source winget
npm install -g openupm-cli
# Mac
brew install node
brew install uv
npm install -g openupm-cli# Go to your unity project directory
cd YOUR_UNITY_PROJECT_DIR
# Add/Update NetSync package with specific version
openupm add -f com.styly.styly-netsync@0.7.5# Start NetSync server
# Use the same version of the Unity package
uvx styly-netsync-server@0.7.5
# [Optional] Start client simulator
uvx --from styly-netsync-server@0.7.5 styly-netsync-simulator --clients 10The uvx command automatically downloads the package, creates an isolated virtual environment, installs dependencies, and runs the python server program.
| SDK setup for HMDs | STYLY XR Rig |
|---|---|
![]() Downloads and installs SDK, and sets up configurations. See more details. |
![]() Supports most of samples in XR Interaction Toolkit, MR mode of HMDs, WASD control in Unity Editor mode and stick locomotion with HMD controllers. |
// Import STYLY NetSync
using Styly.NetSync;All RPC arguments are strings for simplicity.
// Broadcast to all clients in the room
NetSyncManager.Instance.Rpc("FunctionName", new string[] { "arg1", "arg2" });
// Receive RPCs
NetSyncManager.Instance.OnRPCReceived.AddListener((senderClientNo, functionName, args) =>
{
Debug.Log($"RPC(senderClientNo): {senderClientNo}");
Debug.Log($"RPC(functionName): {functionName}");
foreach (var arg in args) Debug.Log($"RPC(args): {arg}");
});All variable values are strings for simplicity.
// Set global variable (shared across all clients in room)
NetSyncManager.Instance.SetGlobalVariable("gameState", "playing");
// Set client-specific variable (set your own)
NetSyncManager.Instance.SetClientVariable("playerScore", "100");
// Set another client's variable (requires their client number)
NetSyncManager.Instance.SetClientVariable("health", "50", targetClientNo);
// Get variables
string gameState = NetSyncManager.Instance.GetGlobalVariable("gameState");
string score = NetSyncManager.Instance.GetClientVariable("playerScore", clientNo);
// Get variables with default value
string gameState = NetSyncManager.Instance.GetGlobalVariable("gameState", "Initial State");
// Listen for value changes
NetSyncManager.Instance.OnGlobalVariableChanged.AddListener((name, oldVal, newVal) => {
Debug.Log($"Global var {name} changed: {oldVal} -> {newVal}");
});
NetSyncManager.Instance.OnClientVariableChanged.AddListener((clientNo, name, oldVal, newVal) => {
Debug.Log($"Client {clientNo} var {name} changed: {oldVal} -> {newVal}");
});Unity: Install package with git URL.
https://github.com/styly-dev/STYLY-NetSync.git?path=STYLY-NetSync-Unity/Packages/com.styly.styly-netsync#develop
Server:
uvx --from "git+https://github.com/styly-dev/STYLY-NetSync@develop#subdirectory=STYLY-NetSync-Server" styly-netsync-server
Use the Release Workflow GitHub Action.
STYLY NetSync uses ZeroMQ as its transport layer – C# (Unity): NetMQ – Python (server): pyzmq
This repository contains multiple sub-projects, each with its own license file. All sub-projects are licensed under the Apache License, Version 2.0.









