public AdMobRewardedVideo(string adUnitId, AllInOneMainThreadDispatcher mainThreadDispatcher) { rewardedVideo = RewardBasedVideoAd.Instance; this.adUnitId = adUnitId; this.mainThreadDispatcher = mainThreadDispatcher; InitializeEvents(); RequestRewardedVideo(); }
void Awake() { if (_instance == null) { _instance = this; DontDestroyOnLoad(this.gameObject); } }
void Awake() { mainThreadDispatcher = GetComponent <AllInOneMainThreadDispatcher> (); #if UNITY_ANDROID banner = new AdMobBanner(androidBannerID, bannerPosition); interstitial = new AdMobInterstitial(androidInterstitialID, mainThreadDispatcher); rewardedVideo = new AdMobRewardedVideo(androidRewardVideoID, mainThreadDispatcher); #endif #if UNITY_IOS banner = new AdMobBanner(IOSBannerID, bannerPosition); interstitial = new AdMobInterstitial(IOSInterstitialID, mainThreadDispatcher); rewardedVideo = new AdMobRewardedVideo(IOSRewardVideoID, mainThreadDispatcher); #endif }
void OnDestroy() { _instance = null; }
public AdMobInterstitial(string adUnitID, AllInOneMainThreadDispatcher mainThreadDispatcher) { this.adUnitID = adUnitID; this.mainThreadDispatcher = mainThreadDispatcher; RequestNewInterstitial(); }