A small Unity 6 project demonstrating the official Prototir Unity SDK. The scene reports readiness, events, scores, persistent storage, and a managed AI request while remaining playable in the Unity Editor through the SDK's local mocks.
- Install Unity 6 with Web Build Support.
- Clone this repository.
- Open the repository folder as a Unity project.
- Wait for Package Manager to install
com.prototir.sdkfrom the pinned SDK commit. - Open Prototir > Project Setup and resolve every blocking issue.
- Open
Assets/Scenes/Main.unityand enter Play mode.
The example configures a local managed-AI mock in the Editor. A Web build uses the real Prototir player and requires managed AI to be enabled for the uploaded prototype.
For a native build, press Pair this build in the example scene. The SDK displays a code and QR
over the game; scan and approve it to connect the build. The playground returns when you close the
pairing screen. In the Editor, set Assets/Resources/PrototirSettings.asset to a prototype slug
before pairing. A downloaded build receives its slug from Prototir during upload.
- Switch to the Web platform.
- Use Prototir > Project Setup > Fix all available.
- Make a non-development build into a clean
Builddirectory. For automation, runUnity -batchmode -quit -projectPath . -buildTarget WebGL -executeMethod PrototirExamples.BuildWeb.Build. - ZIP the contents of
Build, not the directory itself. - Upload the ZIP to Prototir and test resize, fullscreen, focus, storage, and console diagnostics.
The SDK writes prototir.json into the export automatically. This project also includes
Assets/Prototir/prototir.json so its public metadata and managed-AI requirement are explicit.
Run the lightweight repository check with Node.js 20 or newer:
node tools/check.mjsSee the Unity creator guide for the full supported profile.