- Home /
Where can I put Ad admob ID?
Can you help me Where can I put Ad admob ID?
using System;
using UnityEngine;
/// <summary>
/// Advertising sample.
/// This is a reference/sample script for implementing ads in your mobile game.
/// For our Google Play version we used Chartboost.
/// </summary>
public class AdvertisingSample: MonoBehaviour
{
public bool forceShowInterstitial = false; // bool/toggle so we can check and force an interstitial at certain moments in the game
public bool hasInterstitial = false; // is an interstitial cached?
public bool hasRewardedVideo = false; // is a rewarded video cached?
void Awake(){
Scripts.advertising = this;
}
void OnEnable() {
// Do stuff
}
void Start() {
// Do stuff
// E.g. Cache video/interstitials, setup delegates, whatnot...
CacheInterstitial();
CacheVideo();
// Register me
Scripts.advertising = this;
}
public void CacheInterstitial(){
hasInterstitial = true;
}
public void ShowInterstitial(){
Debug.Log("[AdvertisingSample] ShowInterstitial called");
}
public void CacheVideo(){
hasRewardedVideo = true;
}
public void ShowVideo(){
Debug.Log("[AdvertisingSample] ShowVideo called");
}
}
Comment
Your answer
Follow this Question
Related Questions
Admob ads are not working. 1 Answer
Admob banner not showing up? 2 Answers
why i can't find Android Manifest inside stagingArea 0 Answers
AdMob for Unity 5 0 Answers
Active Canvas Button AdMob 0 Answers