Unity Plugin Integration

image

This is one of four steps that walk you through integrating the DT FairBid Unity Plugin with a Unity app:

  1. Unity Plugin Integration (this guide)
  2. Setting-Up DT Fairbid (in the DT Console)
  3. Initializing the SDK
  4. Unity Ad Formats (adding the ads to your app)

Current Plugin Version

  • 3.54.0

Note that since version 3.47.0 DT FairBid and DT Offer Wall are integrated through the same Unity Plugin - the DT FairBid Unity Plugin.

Prerequisites

  • Android 4.1 (API level 16)+ (when building for Android)
  • iOS 11+ (when building for iOS)
  • Unity 2020 LTS or later

Important

  • The DT FairBid Unity Plugin can only be integrated into iOS projects from a Mac - you cannot build your iOS/Xcode project on Windows

Integration Methods

Digital Turbine supports two methods for the integration in Unity:

  1. Integration through Unity's Package Manager
  2. Importing FairBid Unity Plugin Raw Package

Integrating Through Unity's Package Manager

This is the recommended method to integrate the DT FairBid Unity Plugin in your Unity project.

The DT FairBid Unity Plugin is provided as a package in the NPM package registry. This package is imported using Unity Package Manager.

To import the package:

  1. Add the following entries inside your manifest.json file, which you can find under the Packages folder:
  • Add an entry under scopedRegistries, so that unity knows where to search when adding the DT FairBid Unity Plugin dependency. This entry points to the NPM package registry:
{
    …
    "scopedRegistries": [
        {
            "name": "npmjs",
            "url": "https://registry.npmjs.org/",
            "scopes": [
                "com.fyber.fairbid.unity"
            ]
        }
        …
      ],
    …
  }
  
  • Add an entry under dependencies, which references the DT FairBid Unity Plugin version that you intend to integrate:
{
    …
    "dependencies": {
        "com.fyber.fairbid.unity": "3.54.0",
        …
    }
    …
  }
  
  1. Save the changes and open your Unity 3D Project.

The Unity Package Manager resolves the dependencies and now the DT FairBid Unity Plugin should be integrated in the project.

Additionally, to cross-check the integration of DT FairBid:

  1. Go to the “Window” toolbar menu of Unity 3D
  2. Click Package Manager

You should see the following window pop-up with DT FairBid under the section DT and the DT FairBid Unity Plugin version:

You also have the possibility to change the version of the DT FairBid Unity Plugin that you are integrating through the Unity Package Manager.

Importing DT FairBid Unity Plugin Raw Package

Follow the instructions below to manually download the DT FairBid Unity Plugin package.

Manual Download

 

Removing Current Plugin

If you are updating the Plugin:

  1. Make sure there is no trace of the previous version of the DT FairBid Unity Plugin
  2. Remove the FairBid folder

This is a fail-safe way to ensure no legacy file is left behind:

    

Importing New Plugin

  1. Download the DT FairBid Unity Plugin
  2. Unzip the downloaded files
  3. Add the FairBid.unitypackage to your open Unity project

Adding Third-Party SDKs

In addition to integrating the DT FairBid SDK, publishers who are using DT FairBid Mediation, must integrate chosen 3rd-party networks' SDKs into their app.

  • Set up your app in the network's dashboard and in the DT Console. A step-by-step guide can be found here.
  • Download the relevant network's SDK. Supported networks and their SDKs can be found here.
    • You must add additional configurations for each third party network.
    • These entries are found by selecting your third party networks in the table.

Important

The DT FairBid SDK automatically detects and initializes SDKs from 3rd-party networks.

Once you've added all third party SDKs and set-up your app in the console, you can go ahead and initialize the DT Fairbid Unity Plugin.

Back to Top ⇧