unity rewarded ads code example

Example: unity rewarded ads

using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Advertisements;

[RequireComponent (typeof (Button))]
public class RewardedAdsButton : MonoBehaviour, IUnityAdsListener {

    #if UNITY_IOS
    private string gameId = "1486551";
    #elif UNITY_ANDROID
    private string gameId = "1486550";
    #endif

    Button myButton;
    public string mySurfacingId = "rewardedVideo";

    void Start () {   
        myButton = GetComponent 

Tags:

Misc Example