bool isDebugMode = true; // should be false when shipped #endregion Fields #region Methods public static UnityAdsManager GetInstance() { if ( _instance == null ) { GameObject go = new GameObject("UnityAdsManager"); _instance = go.AddComponent<UnityAdsManager>(); _instance.Init(); } return _instance; }
public static UnityAdsManager GetInstance() { if (_instance == null) { GameObject go = new GameObject("UnityAdsManager"); _instance = go.AddComponent <UnityAdsManager>(); _instance.Init(); } return(_instance); }
void InitAds() { Admob = new AdmobManager(); Unity = new UnityAdsManager(); if (Application.platform == RuntimePlatform.Android) { Admob.Init(Data.AndroidInfor.Admob); Unity.Init(Data.AndroidInfor.UnityVideoId); Debug.Log("API init android infors"); } else if (Application.platform == RuntimePlatform.IPhonePlayer) { Admob.Init(Data.IosInfor.Admob); Unity.Init(Data.IosInfor.UnityVideoId); Debug.Log("API init iOS infors"); } else { Admob.Init(Data.IosInfor.Admob); Unity.Init(Data.IosInfor.UnityVideoId); Debug.Log("API init other platform infors"); } }