JSPipe - Seamless WebGL / TypeScript & NPM Bridge View on Asset Store (opens in new tab)

Package details

Latest version
1.0.3
Last updated
First released
Unity version
6000.3.6 or later
Package size
152 KB
Files
31
Favorites
13
Views in the past week
10

Price tracking

Last checked
Tracked since
Lowest recorded
$13.99 on

Keywords

JSPipe - Seamless WebGL / TypeScript & NPM Bridge

by TiltShift (opens in new tab)

No ratings yet

The modern, type-safe replacement for legacy .jslib & SendMessage. Stop writing messy string-based callbacks. Using bi-directional RPC, Async/Await.

Price $19.99

Buy on Asset Store (opens in new tab)

Affiliate link · Purchases support this site

Price history

Last 6 months

USD
Price history for JSPipe - Seamless WebGL / TypeScript & NPM Bridge, 6 months Current $19.99; lowest $19.99; highest $19.99 in this period. $0 $10 $20 Jun Jul Aug Sep Oct Nov

Asset preview

1 / 5

JSPipe - Seamless WebGL / TypeScript & NPM Bridge screenshot 1

JSPipe - Seamless WebGL / TypeScript & NPM Bridge screenshot 1

About this asset

Unity WebGL builds often feel isolated from the web page they run on. Integrating modern web features, frontend frameworks, or browser APIs usually involves .jslib workarounds and messy SendMessage strings. JSPipe changes that.

It introduces a clean, high-level Module-based architecture where your C# classes and TypeScript classes mirror each other. You can define a method in C#, call it directly 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, Promises, and async/await patterns. No more string parsing!

- 📦 Full NPM Support: Use upackage.json to directly install any library from the Node Package Manager (React, Vue, Telegram SDK, Web3 providers). Just install and import them.

- 🛡️ Type-Safe TypeScript: 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 deeply 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, TelegramModule, Web3Module), keeping your codebase clean, scalable, and easy to maintain.

- 🎨 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: 

- 📱 Telegram Web Apps (TWA) / Mini Apps: Seamlessly connect internal Unity logic with the Telegram browser API.

- ⚛️ Modern Frontend Integrations: Easily embed Unity inside React.js, Vue, Angular, or Next.js applications.

- 🪙 Web3 & Crypto: Build seamless connections with Crypto wallets (MetaMask, Phantom, ConnectKit) and smart contracts.

- 🌐 Advanced Browser Features: Complex networking via WebSockets/WebRTC, or cleanly accessing browser APIs (LocalStorage, Geolocation, DOM elements) without writing a single line of .jslib.

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 [email protected]

From the publisher's Asset Store listing.

Technical details

Dependencies (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 seamlessly routed over Unity's native bridge (P/Invoke & Emscripten), abstracted into a high-level TS/C# API.

- Payloads: Supports complex objects, arrays, primitives, and custom DTOs.

- Error Handling: Built-in error propagation (C# Exceptions automatically translate to JS Promise rejections and vice versa).

Compatibility

Render pipelines supported in each Unity version
Unity version Built-in URP HDRP Custom
6000.3.6f1 Compatible Compatible Compatible Compatible

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 TS/NPM logic. The functionality is exclusive to WebGL builds; for other platforms, ensure calls occur only within #if UNITY_WEBGL blocks.

As listed on the Asset Store.