Unity Installation
This page only covers how to install the SDK into a Unity project. The main integration flow after installation is documented in Unity Quick Start.
Prerequisites
Section titled “Prerequisites”- Windows 10 or newer
- Unity
2022.3 LTSor newer - A registered
appIdfrom IGP operations
Import a Unity Package (recommended)
Section titled “Import a Unity Package (recommended)”This is the default distribution form during the current preview phase. After import, the SDK is placed under Assets/IGP.UnitySDK so Unity can compile it directly.
1. Download the packages
Section titled “1. Download the packages”Pick the version you want to pin from Release Notes. For the current Unity SDK version 0.1.6, download:
cn.indiegp.sdk.unity-0.1.6.unitypackage- main package (required)cn.indiegp.sdk.unity.mirror-transport-0.1.6.unitypackage- Mirror transport package (optional)cn.indiegp.sdk.unity.compliance-0.1.6.unitypackage- real-name verification and anti-addiction module (optional)cn.indiegp.sdk.unity.cloud-archive-0.1.4.unitypackage- Cloud Archive module (optional)
Verify the downloaded files against SHA256SUMS in the same release directory.
2. Install Unity dependencies first
Section titled “2. Install Unity dependencies first”The main package depends on Unity’s official Newtonsoft JSON and UGUI packages. If your project does not already have them, open Window -> Package Manager in Unity Editor and add these packages with Add package by name...:
com.unity.nuget.newtonsoft-jsoncom.unity.ugui
You can also add them directly to dependencies in Packages/manifest.json:
"com.unity.nuget.newtonsoft-json": "3.2.1",
"com.unity.ugui": "1.0.0"
3. Import the SDK package
Section titled “3. Import the SDK package”In Unity Editor:
- Choose
Assets -> Import Package -> Custom Package... - Select
cn.indiegp.sdk.unity-0.1.6.unitypackage - Import all files
If the project needs real-name verification and anti-addiction state, import cn.indiegp.sdk.unity.compliance-0.1.6.unitypackage the same way.
If the project needs Cloud Archive, import cn.indiegp.sdk.unity.cloud-archive-0.1.4.unitypackage the same way.
If the project already uses Mirror, import cn.indiegp.sdk.unity.mirror-transport-0.1.6.unitypackage the same way. Make sure Mirror itself is already installed before importing this optional package.
Verify the installation
Section titled “Verify the installation”After opening the project in Unity Editor:
- Confirm
Assets/IGP.UnitySDKexists - If optional packages were imported, confirm their matching
Assets/IGP.UnitySDK.*folder exists - Confirm there are no
IGP.UnitySDKcompilation errors in the Console - Confirm the version in
Assets/IGP.UnitySDK/package.jsonmatches the downloaded release
Once installation is confirmed, continue with Unity Quick Start.