Import and Initialize Unity Package
Before you start
Meson supports Unity version 2018.4.18f1 and above.
The download and use of the SDK is subject to the Meson SDK Licensing Terms. If you do not agree to these terms, do not download, access, or use the SDK, or the underlying services.
#
Download the Meson Unity PackageYou can download the Meson Unity Package here.
#
Import Meson Unity Package to the projectIn Unity, Go to Assets , go to Import Package and select Custom Package . Navigate to the downloaded Meson Unity Package. Select the package. The package contents will show on Unity. Select All and Import.
#
Managing and Adding 3rd Party Ad Network dependencyTo edit 3rd Party Ad Network support, edit MesonDependencies.xml
To access MesonDependencies.xml, Go to Assets > Meson > Scripts > Editor > MesonDependencies.xml
#
Initialise the Unity plugin using Meson Manager (Recommended)- Drag and drop the MesonManager prefab from Assets/Meson/Prefabs onto your scene.
- Enter the required settings as per your need.
Option | Description |
---|---|
Auto Initialise on Start | Check this option to automatically initialise the Meson SDK in Start (). The SDK must be initialised before you can request ads. Leaving it unchecked means you must manually initialise the SDK. |
iOS App ID | Unique Identifier for a iOS app generated on Meson UI while creating a new app |
Android App ID | Unique Identifier for a Android app generated on Meson UI while creating a new app |
Log level | Specify log verbosity (‘none’, ‘error’ or ‘debug’) for the Meson SDK. |
GDPR Consent | GDPR consent can be passed either as a IAB v1 or v2 string, boolean value. |
Callback | Subscribe to initialisation callback to listen to for initialisation event completion lifecycle. |
- iOS and Android App ID must be set for successful integration.
#
Initialise the plugin manually- In the app
Start()
method, instantiate a Meson.SdkConfiguration object with i. iOS App ID - Unique Identifier for a iOS app generated on Meson UI while creating a new app ii. Android App ID - Unique Identifier for a Android app generated on Meson UI while creating a new app iii. Log level - Specify log verbosity (‘none’, ‘error’ or ‘debug’) for the Meson SDK. iv. Consent (optional) - GDPR consent can be passed either as a IAB v1 or v2 string, boolean value. - Call Meson.InitializeSDK() and pass the Meson.SdkConfiguration Object
- Register for
onSDKInitializedEvent
callback event.
#
Add User DataNote
- To use cohorts in Meson UI, this is where you will need to set PPID unique to a user
- To use segments or experiments in Meson UI, this is where you will need to send the segments or experiments.
This is optional. In case you want to send us any information about the user, please do as follows: