2. Install the Airflux SDK

1. SDK Installation

Follow the steps below to add the Airbridge SDK package file to your project.

  1. Download the latest version of the Airflux Unity SDK package filearrow-up-right.

  2. Import the package file by selecting the menu option [Assets]>[Import Package]>[Custom Package].

  3. When the import is complete, the [Airflux] tab will appear in the top menu bar of the Unity Editor.


2. SDK Initialization

Initialize the SDK by referring to the code below.

SDK Option
Data Type
Description
Required

App Name

string

Input the App Name from the Airbridge dashboard.

Required

App Token

string

Input the App Token from the Airbridge dashboard.

Required

SDK Enabled

boolean

Set whether to enable the SDK upon initialization.

  • true: The SDK is initialized in active mode.

  • false: The SDK is initialized in inactive mode and is enabled upon calling the Airflux.EnableSDK() function.

Optional

Auto Start Tracking Enabled

boolean

Set whether to collect events automatically upon SDK initialization.

  • true: Event collection starts automatically upon initialization.

  • false: Event collection starts upon calling the Airflux.StartTracking() function.

Optional

Log Level

AirfluxLogLevel

Set the log level for the Airflux SDK. Choose from debug, info, warning, error, fault .

Optional

Session Timeout

double

The default value is 300 seconds. Modify if needed.

Optional

Allow Every Country Enabled

boolean

When set to true, all countries are allowed to follow Airflux's optimization policies. To use a specific list of countries, set it to false and provide a list using setCountryAllowlist().

Optional

Country Allowlist

List<String>

Set the countries where calling the Airflux's inference API should be allowed. Use country codes following the ISO 3166-1 alpha-2 format (e.g., US, KR). You can set multiple countries using the Country Allowlist. Airflux identifies a country based on the value tied to the device.

Optional


3. Verification

Unity Log check

To view detailed log information for your app, use the Unity Log tool.

circle-exclamation

4. Frequently Asked Questions

circle-info

Opt-in policy compliance

If player consent is required to send in-game data, implement the necessary setup by following the FAQ section below.

How can I set up the Airflux SDK to comply with the opt-in policy?arrow-up-right

chevron-rightHow can I set up the Airflux SDK to comply with the opt-in policy?hashtag

The opt-in policy requires user consent before collecting and using player data. To adhere to this policy, implement the following methods.

  1. SDK opt-in setup

Upon initialization of the Airflux SDK, set the initialization option SetAutoStartTrackingEnabled()to false and call the StartTracking() function at the point where you have received user consent for data tracking. The Airflux SDK will collect data after the startTracking() function is called.

circle-exclamation
  1. Initializing the Airflux SDK in inactive mode

circle-exclamation

Set the initialization option SetSDKEnabled() to false to initialize the SDK with all functions disabled until user consent for data tracking is obtained. Through this method, you can adhere to privacy policies to the highest level. Note that when the SDK is set in inactive mode, all features are disabled and no events and player attribute data is sent to Airflux.

chevron-rightHow can I configure the Airflux SDK to call the Inference API only in specific countrieshashtag

Set the initialization opeion SetAllowEveryCountryEnabled() to false and add the countries you want to allow to the "Country Allowlist". Country codes should follow the ISO 3166-1 alpha-2 format (e.g., "US", "KR"), and multiple countries can be specified by separating codes with commas. Country codes are not case-sensitive.

chevron-rightCan I use other mediation platforms, such as MAX and AdMob, with Airflux?hashtag

Yes, Airflux is designed to work alongside existing mediation platforms.

chevron-rightHow does Airflux determine a user’s country?hashtag

Airflux distinguishes a country based on the value tied to the deivce.

chevron-rightDoes Airflux collect the ADID (Advertising ID)?hashtag

No. The Airflux SDK operates without collecting or requiring the ADID.

5. Troubleshooting

chevron-right[Android] A coroutine dependency error occurs during the build process. hashtag

Issue

A coroutine dependency error occurs during the build process with the following message.

Cause

If the kotlinx-coroutines-core library version is 1.3.5 or later, the kotlin-stdlib library version must be at a certain level or laterarrow-up-right.

Solution

Check whether the kotlin-stdlib library version is v.1.3.70 or later with the gradlew dependencies command. If the version is earlier than v.1.3.70, you need to update it.

Last updated