AppBrain | Help Center

Integration with Unity

This section describes how to integrate the AppBrain SDK into your Unity app and start monetizing it.

Unity integration steps

  • Download the AppBrain SDK from the AppBrain SDK GitHub page
  • Open Unity with your project, e.g. “MyProject”
  • The Unity related files are in the AppBrain SDK in the unity/ directory. Copy these files (Ads.cs, AppBrain.cs, AndroidManifest.xml, OfferwallButtonListener and appbrain-applift-sdk-VERSION.jar) to "MyProject"/Assets/Plugins/Android
  • Call AppBrain functions where appropriate (see below)

If you use your own AndroidManifest.xml, please add the AppBrain specific lines from our example file. Also add the following line to the Unity Player activity definition:

        android:value="true" />

The following example shows the use of AppBrain functions in C# (see also main.cs).

using UnityEngine;
using System.Collections;
using AppBrainSdk;

public class main : MonoBehaviour {
    void Start () {

    void Update () {
        if (Input.GetKeyUp(KeyCode.Escape)) {

If you attach the main.cs script to one of the main objects (for instance the camera) of your main scene, you will then automatically get the interstitial on back press.

Creating a “More apps” button

If you create a Button in Unity you can attach the script OfferwallButtonListener to it. It needs a parameter myButton which you should set to the button, and then the button will open up the Offerwall when clicked. This use doesn’t require permission from us.

Please refer to the rest of the documentation for further instructions on how to use the SDK.