Perkox Unity SDK
The official Perkox Offerwall SDK for Unity enables game developers to integrate high-converting, rewarded offerwalls into mobile games for Android and iOS with native performance.
With Perkox, players can earn in-game virtual currency (coins, gems, energy) by completing offers, surveys, and rewarded actions.
Key Features
Single Cross-Platform C# API: Clean, static methods for Unity game developers.
Native Android & iOS Power: Powered by the official Perkox Android SDK (Kotlin) and iOS SDK (Swift/XCFramework).
Unity Editor Simulation (Mock Mode): Test your game loop, UI, and reward distribution directly inside the Unity Editor without crashes or errors.
Automated Dependency Resolution: Supports Google External Dependency Manager for Unity (EDM4U) and CocoaPods.
Anti-Fraud & Verification: Built-in verification and attribution tracking for maximum publisher revenue protection.
Requirements
Unity Editor
Unity 2020.3 LTS or higher
Android
Android 5.0 (API Level 21) or higher
iOS
iOS 12.0 or higher, Xcode 14+
Scripting Backend
Mono or IL2CPP
Installation
Method 1: Unity Package Manager (UPM via Git URL) — Recommended
In the Unity Editor, navigate to Window > Package Manager.
Click the
+icon in the top-left corner and select Add package from git URL...Enter the public release repository URL:
(Or specify a tag: https://github.com/perkoxofficial/perkox-unity-sdk-releases.git#v2.0.0) 4. Click Add. Unity will automatically download and install the package into your project.
Method 2: .unitypackage Manual Import
Download the latest
Perkox-Unity-SDK-v2.0.0.unitypackagefrom the official GitHub Releases.Drag and drop the
.unitypackageinto your Unity project window (or go to Assets > Import Package > Custom Package...).Ensure all files are checked and click Import.
Quick Start Guide
1. Initialize the SDK
Call PerkoxSDK.Initialize() early in your game lifecycle (for example, in your GameManager's Awake() or Start()):
2. Set Player ID (User Identification)
When a player signs in or their unique account ID becomes known, update the SDK:
Important: The
playerIdmust NOT be empty. Always provide a unique user identifier so rewards and postbacks are accurately attributed to the player.
3. Show the Offerwall
Call PerkoxSDK.ShowOfferwall() when the player taps on an "Earn Rewards" or "Offerwall" button:
Critical: Package ID Matching Requirements
The Perkox backend validates incoming requests against registered App credentials (app_id, sdk_key, and package_id).
Android
Player Settings > Identification > Package Name
MUST match the Android Package ID registered in your Perkox Dashboard.
iOS
Player Settings > Identification > Bundle Identifier
MUST match the iOS Bundle Identifier registered in your Perkox Dashboard.
Warning: If the Package Name / Bundle ID does not match the dashboard app entry, the offerwall will return
Invalid package_id for this offerwalland show zero offers.
Platform Specific Setup
Android Setup
Minimum API Level: 21 (Android 5.0 Lollipop).
Target API Level: Android 14 (API Level 34) or latest Google Play requirement.
If using EDM4U (External Dependency Manager for Unity), resolve dependencies via Assets > External Dependency Manager > Android Resolver > Resolve.
iOS Setup
Target SDK: iOS 12.0 or higher.
Post-build script (
PerkoxPostProcessBuild.cs) automatically configures the Xcode project with Swift 5.0 and-ObjClinker flags.Run
pod installin the generated Xcode project directory if using CocoaPods.
Unity Editor Simulation (Mock Mode)
When testing inside the Unity Editor (Play Mode):
PerkoxSDK.Initialize()safely logs initialization parameters to the Unity Console.Calling
PerkoxSDK.ShowOfferwall()triggers simulated callbacks:Fires
OnOfferwallOpenedDispatches a test
OnRewardReceivedcallback (100 Coins)Fires
OnOfferwallClosed
Allows complete game loop verification without building native Android or iOS binaries.
Server-Side Postback (Recommended)
For secure reward validation, configure a server-side postback URL in your Perkox Dashboard. When a player finishes an offer, Perkox sends a secure server-to-server callback:
Verify the postback signature with your secret key before crediting virtual currency to player balances.
Support
Need help with integration?
Dashboard: pub.perkox.com
Email: [email protected]
Last updated
