Unity WebGL Export
Prepare a Unity WebGL build for RetiPie with working Player Settings, package it as a ZIP, and call the Unity SDK from C# for lifecycle and leaderboards.
RetiPie includes sdks/unity, a Unity WebGL package that exposes C# bindings for the window.retipie bridge.
Requirements
- Unity 2022.3 or newer.
- A WebGL build that runs in a browser without external service dependencies.
- Assets included in the build output.
- No bundled third-party ad network or tracking SDK.
Player Settings
Open Project Settings → Player → Web (WebGL) → Publishing Settings and check these before building:
| Setting | Use |
|---|---|
| Compression Format | Brotli, Gzip or Disabled — all three work. |
| Decompression Fallback | Off. |
| Native C/C++ Multithreading | Off. |
Compression Format. Unity's compressed builds normally need a web server that sends a Content-Encoding header. RetiPie doesn't need one: when your ZIP contains a Unity loader (*.loader.js), RetiPie decompresses the .data, .framework.js, .wasm and .symbols.json files in that build folder during upload. They keep their original names, so your index.html stays the same. Brotli gives the smallest ZIP to upload.
Decompression Fallback. With this option, Unity's loader runs its JavaScript from a blob: URL. The game runtime blocks blob: scripts, so the game stops while loading.
Multithreading. Threads need Web Workers and SharedArrayBuffer, and the game runtime blocks both. Keep the build single-threaded.
Build and upload
- Build the game for WebGL.
- Inspect the output folder and confirm
index.htmland theBuild/folder are present. - ZIP the build output with
index.htmlat the root, or inside one shared root folder. - Upload the ZIP in RetiPie Slice.
- Use the device preview to test loading, input, audio, and runtime scale.
The ZIP limits apply to the decompressed files: each file can be up to 200 MB, and the whole game up to 500 MB.
SDK package
Install the Unity package from this repository path:
https://github.com/RetiPie/retipie.git?path=sdks/unity/Packages/com.retipie.sdkThe package is a no-op in the Unity Editor and on non-WebGL platforms. Runtime calls are active when the game runs as a WebGL export inside RetiPie.
Unity WebGL compiles to WebAssembly, which RetiPie supports. Keep the build self-contained — external resources and dynamically loaded scripts are blocked at runtime. See Game Requirements for the practical constraints.
Godot HTML5 Export
Prepare a single-threaded Godot 4.3+ Web export, package it as a ZIP for RetiPie, and use the Godot SDK wrapper for lifecycle, analytics, and leaderboards.
Phaser Browser Game Guide
Prepare a Phaser indie browser game for RetiPie with bundled assets, touch controls, responsive canvas sizing, and SDK integration.