API Reference
The SDK is used to communicate between your game and the IndiePass client, which means that to function, the client must be started on your machine. You can use it for your game to use the features of the IndiePass platform.
Installation
Download
Download the SDK from the links provided in the downloads section and follow the instructions below to integrate it into your project.
Integration into your project
To use the SDK in your project, follow these steps:
- Download the version that corresponds to your project.
- Unzip the class and files into your project.
- Use IndiePassSDK to call methods.
Compatibility
- Supported operating systems: Windows 64bit, Windows 32bit
- Supported languages: C#, C++
Functions
| Function | Behavior | Parameters | Behavior in simul mode |
|---|---|---|---|
unlockAchievement | Unlocks an achievement for the player and record it. | string achievement | Unlocks an achievement but does not record it. |
lockAchievement | Locks an achievement for the player. | string achievement | |
setSimul | Activate simul mode. You have to disable this in production | bool isSimul | |
initSdk | Initializes the SDK and checks if the player has the right to play (active subscription) If autoclose is enabled and validation fails, the game will automatically close. | string uuid, string publicKey, bool autoclose | Checks if the player has the right to play (active subscription or game developer) -Returns true if the player has the right to play and if the client is running. -Returns false if the player does not have permission to play or if the client is not running. |
initSdk Parameters
- uuid (string): Your game's unique identifier (UUID format)
- publicKey (string): Your game's public key for authentication
- autoclose (bool): Automatically closes the game if validation fails or client is not running
- Recommended: Enable (
true) in production builds - Recommended: Disable (
false) during development to avoid interruptions
- Recommended: Enable (
warning
The autoclose parameter should be set to false during development to prevent the game from closing unexpectedly while testing. Enable it in your production builds to ensure proper DRM enforcement.