High-performance WebGL bridge. Integrate TS & NPM directly. Features type-safe bi-directional RPC, Async/Await, and automated builds. The modern replacement for legacy .jslib & SendMessage.Render Pipelines:JSPipe is code-only and render-agnostic. It is fully compatible with Built-in, URP, and HDRP.Platform:Designed specifically for WebGL. It relies on the browser environment to execute the TypeScript/NPM logic. The functionality is exclusive to WebGL builds; for other platforms, ensure calls occur only within #if UNITY_WEBGL blocks.Unity WebGL builds often feel isolated from the web page they run on. Integrating modern web features usually involves hacky workarounds. JSPipe changes that.It introduces a Module-based architecture where C# classes and TS classes mirror each other. You can define a method in C#, call it from JS, and await the result asynchronously—and vice versa.Key Features:- ⚡ bi-Directional RPC: Call C# methods from JS and JS methods from C# with full support for return values and `async/await` patterns.- 📦 Full NPM Support: Use `upackage.json` to install any library from the Node Package Manager. Just install and import them.- 🛡️ Type-Safe TS: Write your frontend logic in TS. The package includes an automated build pipeline that compiles your `.ts` files into a highly optimized bundle.- 🚀 Automated Pipeline: No manual build steps required. JSPipe integrates with the Unity Build Player. It utilizes esbuild for lightning-fast bundling and Html Agility Pack to inject scripts into your WebGL templates automatically.- 🧩 Modular Architecture: Organize your communication logic into named Modules (e.g., `AuthModule`, `SaveSystemModule`), keeping your codebase clean and scalable.- 🎨 Custom WebGL Templates: Create custom `index.html` templates with dynamic script injection support.Workflow:1. Create: Write a C# class inheriting from `JSPipeModule`.2. Mirror: Write a TS class extending `JSPipeModule`.3. Register: Add methods using `RegisterHandler` / `registerHandler`.4. Build: Hit Build & Run. JSPipe compiles the TS, bundles dependencies, and patches the WebGL build automatically.Perfect for: - Web3 games- heavy frontend integrations- complex networking via WebSockets/WebRTC, or simply accessing browser APIs (LocalStorage, Geolocation) cleanly.Dependencies:- Asset uses UniTask under MIT License; see Third-Party Notices.md file in package for details.- Asset uses esbuild under MIT License; see Third-Party Notices.md file in package for details.- Asset uses Html Agility Pack under MIT License; see Third-Party Notices.md file in package for details.If you have issues, please don't hesitate to email contact@tiltshift.xyzDependencies (Included/Managed):- UniTask: Used for efficient allocation-free async/await operations in C#.- esbuild: An extremely fast JS bundler used internally to compile your TS and NPM packages.- Html Agility Pack: Used for parsing and modifying HTML templates during the build process.- Newtonsoft.Json: Required for robust JSON serialization between C# and JS.Requirements:- Unity 6000.0 LTS or higher.- WebGL Platform module installed.Architecture:- Communication Layer: JSON-RPC over Unity's native bridge (P/Invoke & Emscripten).- Payloads: Supports complex objects, primitives, and custom DTOs.- Error Handling: Built-in error propagation (C# Exceptions translate to JS Promise rejections).




