SDK Documentation
HomeBlogSign up
English
English
  • 🏠Homepage
  • 🧪Test Ad Units
  • Privacy
    • ✅Google Data Safety
  • Android SDK
    • ⌨️SDK integration
      • App Open
      • Banner
      • Interstitial
      • Rewarded
      • Native (Google)
      • Targeting
      • Revenue reporting
    • 🙎User consent
    • 🔓Privacy
    • 🛠️ProGuard
  • iOS SDK
    • ⌨️SDK integration
      • App Open
      • Banner
      • Interstitial
      • Rewarded
      • Native (Google)
      • Revenue reporting
    • 🙍User consent
    • 🔓Privacy
  • Unity SDK
    • ⌨️SDK integration
      • App Open
      • Banner
      • Interstitial
      • Rewarded
      • Targeting
      • Revenue reporting
    • 🙎User consent
    • 🔓Privacy
  • Flutter SDK
    • ⌨️SDK integration
      • App Open
      • Banner
      • Interstitial
      • Rewarded
      • Native (Google)
      • Targeting
      • Revenue reporting
    • 🙎User consent
    • 🔓Privacy
  • React Native
    • ⌨️SDK integration
      • App Open
      • Banner
      • Interstitial
      • Rewarded
      • Targeting
      • Revenue reporting
    • 🙎User consent
    • 🔓Privacy
  • Web SDK
    • ⌨️SDK integration
Con tecnología de GitBook
En esta página
  • Requisites
  • Import Unity package
  • Setup SDK
  • Request consent
  • Initialize SDK
  • Test mode
  1. Unity SDK

SDK integration

AnteriorPrivacySiguienteApp Open

Última actualización hace 3 días

Requisites

This documentation has been written for Unity 2020 or higher. It is recommended to use these versions when integrating the SDK.

Import Unity package

In first place, it is needed to download the Unity package from the following link:

Once downloaded, double click on the file to import it into the project.

Setup SDK

To setup the SDK, go to the Wortise -> Settings option in the Unity menu bar. After selecting the option, the settings window will open where you must specify the Google application IDs for each platform:

This value can be found in our dashboard, inside the app details, under the name Google App ID.

Request consent

It is very recommended to request the user consent to be able to show personalised ads. This will allow to display content of more interest and generate higher revenues.

Initialize SDK

To initialize the SDK, it is needed to add the following lines in the Start() method of the first project Scene. Also, we recommend to implement the OnInitialized event to request the consent once the initialization has finished:

void Start() {
    ...
    
    WortiseSdk.OnInitialized += () => {
        WortiseConsentManager.RequestIfRequired();
    };
    
    WortiseSdk.Initialize("your app key");
}

Test mode

To verify the integration, the SDK provides a test mode that allows the app to always receive ads.

Beside the option that is available in our dashboard, you can programmatically enable this test mode, from the SDK itself, by using the following code:

WortiseAdSettings.IsTestEnabled = true;

You can consult the following section to implement this request and obtain the user consent:

⌨️
User consent
https://cdn.resources.wortise.com/sdk/unity/Wortise-Unity-1.7.0.unitypackage
Window screenshot