Setup for Android
#
IntroductionThe Android version of the Antidote SDK is compatible with various Unity versions:
- Unity 6: fully supported
- LTS 2023: fully supported
- LTS 2022: fully supported
- LTS 2021: fully supported
- LTS 2020: fully supported
- LTS 2019 and older versions might be supported, but these haven't been officially tested
#
Setup#
UnityHere's how to integrate the Antidote SDK with your Unity game on Android:
- Download the latest version of the Antidote SDK.
- Make sure you have TextMesh Pro (TMPro) installed.
note
You can check this in Unity's Package Manager by searching for TextMeshPro. See the "Tips & Troubleshooting" section below for detailed instructions.
- When the TMP Importer window appears, import
TMP Essentials
. - Go to
Assets/Import Package/Custom Package...
. - Select the Antidote SDK file you downloaded:
unity/antidote-sdk.unitypackage
). - Click
Import
. - Go to
Assets/AntidoteSDK/Scenes
in the Project Explorer. - Open the
AntidoteSetup
scene. - Go to
File/Build Settings...
. - Click
Add Open Scenes
. - Ensure the
AntidoteSDK
scene is at the top of the list. If not, drag it to the top. - Close the window.
- Configure the features you want to use from Antidote SDK.
- Go to the
AntidoteSetup/Setup
object. - On the Setup object, mark the features you want to enable/disable.
- (Optional) On the Watermark Prefab, edit the features to your preference.
#
Watermark settingsWhen you select the Watermark Prefab:

You will have access to the following settings:
Feature | Description |
---|---|
Speed | The speed at which the ticker(s) move across the display. |
Change Position Timer | The number of seconds before the watermark behaviour updates - this is relevant for the Ticker, DVD and Random behaviours. |
Behaviour | The watermark behaviour you want to display. |
#
Game EventsEvents can be emitted during gameplay to track once-off events, and the duration of long-running events. These can be viewed on the session recording.
- open the assembly definition in the folder where it needs to be called
- scroll down to
Assembly Definition References
- click on
+
- click on the dot icon where it says
(Missing Reference)
- double click on
AntidoteSDK
Then, to emit an event add the following to your code:
#
Game Events Data structureAll game events consist of an action
and an event name
, where action
can be one of the following:
Action | Description |
---|---|
start | mark the start of a long-running event (e.g. boss_battle) |
end | mark the end of a long-running event (e.g. boss_battle) |
once | emit a once-off event (e.g. collected_powerup) |
#
One last thingAntidote SDK requires internet connectivity to verify the user session. If you
are exporting your game for Android, please make sure to enable android.permission.INTERNET
in your AndroidManifest.xml.
#
Tips & Troubleshooting#
How to Install TMPro on Unity 2023 and olderTextMeshPro is required for the Watermark text elements to function. It is part of Unity's default registry, so every project will have access to it without additional downloads. For step by step instructions for installation see below:
- Go to Package Manager and ensure you are on
Packages: Unity Registry
. - Use the search bar to search
TextMeshPro
or scroll to the correct location - Click
Install
in the bottom right of the window. If it saysRemove
orUpdate
, it is already installed. - If the TMP importer appears, click
Import TMP Essentials
. TheImport TMP Examples & Extras
is not necessary.
note
If the Watermark has broken references due to TMPro missing, reimporting the AntidoteSDK Package will fix it after following the above steps.
#
How to Install TMPro on Unity 6TextMeshPro is essential for the Watermark text elements to work. Here's how to install it:
- Open the Package Manager and ensure you're on the Unity Registry.
- Search for
Unity UI
or locate it manually. - Click
Install
. If it's already installed, you'll seeRemove
orUpdate
. - If the TMP Importer appears, click
Import TMP Essentials
. You don't need to import TMP Examples & Extras.
note
If the Watermark has broken references due to TMPro missing, reimporting the AntidoteSDK Package will fix it after following the above steps.
#
How to enable internet permission on AndroidBy default, if Unity detects that you are using a network API, it will enable the INTERNET permission in your AndroidManifest.xml. Unfortunately this detection sometimes fails. In such cases we can force the permission, following the steps below:
- Go to
File/Build Settings
- Under
Platform
, selectAndroid
- Click the
Player Settings
button - Under
Configuration
, changeInternet Access
from Auto to Require
