Skip to main content

Unity SDK

The Immutable SDK for Unity helps you integrate your game with Immutable Passport.


💡Supported Platforms
  • Windows (64-bit) - Supports Mono builds. For IL2CPP, refer to this.
  • macOS (minimum version 12.5)
  • Android (minimum version 5.1)
  • iOS (minimum version 15.2)
  • WebGL
💡Supported Unity Versions
  • Unity 2021.3 or newer for Windows, macOS, Android, iOS and WebGL.
  • Unity 2019.4 or newer for macOS, Android, and iOS. Windows isn't supported on Unity versions from 2019.4 up through 2021.2.
💡Target Platform vs Unity Editor Platform

We have added compilation flags to our Unity SDK to ensure that specific Unity editors can only build certain platform targets. Please note that the table below indicates which editor you can use to build a platform target, but it does not determine whether you can run the SDK in that editor.

For example, our SDK allows you to build iOS games using a macOS Unity Editor, but you cannot use the Windows Unity Editor.

  • Target Platform: The platform you're building for
  • Unity Editor Platform: The OS you're running the Unity Editor on
Target PlatformWindowsmacOSAndroidiOSWebGL
Windows Unity Editor
macOS Unity Editor

Installation

Via UPM window

  1. Since .dll files are stored on Git Large File Storage, you must download and install git-lfs from here
  2. Open the Package Manager
  3. Click the add + button and select "Add package from git URL..."
  4. Enter https://github.com/immutable/unity-immutable-sdk.git?path=/src/Packages/Passport and click 'Add'

Via manifest.json

  1. Since .dll files are stored on Git Large File Storage, you must download and install git-lfs from here
  2. Open your project's Packages/manifest.json file
  3. Add "com.immutable.passport": "https://github.com/immutable/unity-immutable-sdk.git?path=/src/Packages/Passport" in the dependencies block

Install a specific version

To install a specific version of the SDK from a git URL, append '#' followed by the version tag. For example, https://github.com/immutable/unity-immutable-sdk.git?path=/src/Packages/Passport#v1.0.0 will add the Unity SDK version 1.0.0.

Install from a zip file

  1. Go to our Unity SDK GitHub Releases
  2. Click on the version you would like to install
  3. Download the Immutable-Passport.zip and extract the zip file
  4. Open the Package Manager
  5. Click the add + button and select "Add package from disk..."
  6. Navigate to the Passport package root folder (src/Packages/Passport)
  7. Double-click the package.json file

Install by cloning the repository

  1. Since .dll files are stored on Git Large File Storage, you must download and install git-lfs from here before cloning the repository
  2. Clone the unity-immutable-sdk repository or download the zip/tarball from one of the versions here
  3. Open the Package Manager
  4. Click the add + button and select "Add package from disk..."
  5. Navigate to the Passport package root folder (src/Packages/Passport)
  6. Double-click the package.json file

Dependencies

The Unity SDK requires UniTask package (version 2.3.3) as specified in package.json.

How to install UniTask

Follow the instructions here.

If you encounter any conflicts, please check out Unity's guide here.

Packages

The Unity SDK consists of multiple packages:

NameDescription
PassportThe core package required to use the Unity SDK. It provides authentication, wallet creation functions, and enables interaction with the Immutable zkEVM.
OrderbookProvides a generated API client with functions to create, cancel, and execute orders.

Examples

  • Sample App - see the sample application for examples of how to use the Immutable Unity SDK.
  • Sample Game - see the sample game tutorial on how to use the Immutable Unity SDK.

Further documentation