ReflectDocs
Browse docsOverview
Unity SDK

Installation

Three ways to add Reflect to your Unity project. UPM Git URL is the recommended path — instant updates, no review delay.

Requirements

  • Unity 2021.3 LTS or newer
  • Android: minSdkVersion 21 (Android 5.0)
  • iOS: iOS 12+
  • No third-party SDK dependencies — Reflect ships with everything it needs

Option A — UPM Git URL (recommended)

In Unity, open Window → Package Manager, click +, choose Add package from git URL…, paste:

https://github.com/bablu147/reflect-sdk.git#v2.2.0

Pin to a tag (the #v2.2.0 suffix). Bumping versions is one line in Packages/manifest.json:

{
  "dependencies": {
    "com.reflect.sdk": "https://github.com/bablu147/reflect-sdk.git#v2.2.0"
  }
}

Option B — Unity Asset Store

Search the Asset Store for Reflect — Free MMP for Unity, click Add to my assets, then import via the Package Manager’s My Assets tab. Free.

Use the Asset Store for discovery, the Git URL for updates.
Asset Store updates go through Unity QA review (5–20 days). The Git URL ships within minutes of a tag push. Both work; mix as you like.

Option C — manual .unitypackage

Download the latest Reflect-2.2.0.unitypackage from the GitHub releases page, drag into Unity, click Import. Useful for offline / air-gapped environments.

Android — extra Gradle setup

Reflect needs two Google Play libraries. Add to your Assets/Plugins/Android/mainTemplate.gradle:

dependencies {
    implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
    implementation 'com.android.installreferrer:installreferrer:2.2'
}

If you use External Dependency Manager for Unity (EDM4U), add a ReflectDependencies.xml instead — same effect.

Release builds (R8 / minification) — now handled automatically. A minified release build would otherwise strip the SDK’s native bridge (com.reflect.sdk.**, used for device-info and install-referrer collection), making app_install never fire — installs/attribution would disappear even though a debug APK works. As of v2.2 a Unity Editor post-processor auto-injects the ProGuard keep-rules (and the Google deps) into the generated Gradle on every build, so this can no longer be misconfigured — no manual Custom Proguard File step required. (To manage Gradle yourself, define REFLECT_SKIP_ANDROID_GRADLE and follow Plugins/Android/REFLECT_GRADLE_SETUP.md.) Sanity-check a minified build with adb logcat | grep -i reflect: you should see Device info collected. and an app_install event.

The AD_ID permission for the Google Advertising ID is declared by the SDK manifest and merges in automatically (remove it only for COPPA/kids apps). In Google Play Console you must still declare it: App content → Advertising ID and Data safety (Device or other IDs).

iOS — auto-handled

The SDK’s build post-processor wires everything for you on each iOS build:

  • Adds AdSupport, AppTrackingTransparency, AdServices frameworks
  • Injects NSUserTrackingUsageDescription into Info.plist (customize via ReflectBuildPostProcessor.AttUsageDescription)
  • Copies PrivacyInfo.xcprivacy (SDK-level privacy manifest)

Set the scripting define REFLECT_SKIP_IOS_POSTPROCESS if you’d rather wire these manually.

Verify

After import, open Edit → Project Settings → Player. The Reflect SDK doesn’t change any settings on its own — it just adds files. Open the Project window and confirm you see Packages/Reflect SDK/ with Editor/, Plugins/, Runtime/, Samples~/ folders.

Try the Basic Usage sample (Package Manager → Reflect SDK → Samples → Import). It runs the SDK in debug mode (no BaseUrl) so you can see the in-game overlay before connecting to a server.