public static void setDefaultRewardItemAsRewardItem() { if (_campaignsAvailable) { UnityAdsExternal.setDefaultRewardItemAsRewardItem(); } }
public static void hide() { if (isShowing) { UnityAdsExternal.hide(); } }
public static void hide() { if (_adsShow) { UnityAdsExternal.hide(); } }
// Token: 0x06000150 RID: 336 RVA: 0x00004D2C File Offset: 0x00002F2C public void Init(string gameId, bool testModeEnabled) { if (UnityAds.initCalled) { return; } UnityAds.initCalled = true; try { if (Application.internetReachability == NetworkReachability.NotReachable) { Utils.LogError("Internet not reachable, can't initialize ads"); return; } IPHostEntry hostEntry = Dns.GetHostEntry("impact.applifier.com"); if (hostEntry.AddressList.Length == 1 && hostEntry.AddressList[0].Equals(new IPAddress(new byte[] { 127, 0, 0, 1 }))) { Utils.LogError("Video ad server resolves to localhost (due to ad blocker?), can't initialize ads"); return; } } catch (Exception ex) { Utils.LogDebug("Exception during connectivity check: " + ex.Message); } UnityAdsExternal.init(gameId, testModeEnabled, UnityAds.SharedInstance.gameObject.name, UnityAds._versionString); }
public void Init(string gameId, bool testModeEnabled) { // Prevent double inits in all situations if (initCalled) { return; } initCalled = true; try { if (Application.internetReachability == NetworkReachability.NotReachable) { Utils.LogError("Internet not reachable, can't initialize ads"); return; } #if UNITY_ANDROID System.Net.IPHostEntry videoAdServer = System.Net.Dns.GetHostEntry("impact.applifier.com"); if (videoAdServer.AddressList.Length == 1) { // 0x7F000001 equals to 127.0.0.1 if (videoAdServer.AddressList[0].Equals(new System.Net.IPAddress(new byte[] { 0x7F, 0x00, 0x00, 0x01 }))) { Utils.LogError("Video ad server resolves to localhost (due to ad blocker?), can't initialize ads"); return; } } #endif } catch (System.Exception e) { Utils.LogDebug("Exception during connectivity check: " + e.Message); return; } UnityAdsExternal.init(gameId, testModeEnabled, SharedInstance.gameObject.name); }
public static string getCurrentRewardItemKey() { if (_campaignsAvailable) { return(UnityAdsExternal.getCurrentRewardItemKey()); } return(""); }
public static bool hasMultipleRewardItems() { if (_campaignsAvailable) { return(UnityAdsExternal.hasMultipleRewardItems()); } return(false); }
public void onVideoStarted() { if (OnVideoStarted != null) { OnVideoStarted(); } UnityAdsExternal.Log("onVideoStarted"); }
public static bool setRewardItemKey(string rewardItemKey) { if (_campaignsAvailable) { return(UnityAdsExternal.setRewardItemKey(rewardItemKey)); } return(false); }
public static string getDefaultRewardItemKey() { if (_campaignsAvailable.Count > 0) { return(UnityAdsExternal.getDefaultRewardItemKey()); } return(""); }
public static bool canShowZone(string zone) { if (!isInitialized || isShowing) { return(false); } return(UnityAdsExternal.canShowZone(zone)); }
public static bool canShowAds() { if (_campaignsAvailable) { return(UnityAdsExternal.canShowAds()); } return(false); }
public static List <string> getRewardItemKeys() { List <string> retList = new List <string>(); string keys = UnityAdsExternal.getRewardItemKeys(); retList = new List <string>(keys.Split(';')); return(retList); }
/* Events */ public void onHide() { _adsShow = false; if (OnHide != null) { OnHide(); } UnityAdsExternal.Log("onHide"); }
// Token: 0x06000157 RID: 343 RVA: 0x00004E70 File Offset: 0x00003070 public static List <string> getRewardItemKeys() { List <string> list = new List <string>(); string rewardItemKeys = UnityAdsExternal.getRewardItemKeys(); return(new List <string>(rewardItemKeys.Split(new char[] { ';' }))); }
public void onFetchCompleted() { _campaignsAvailable = true; if (OnCampaignsAvailable != null) { OnCampaignsAvailable(); } UnityAdsExternal.Log("onFetchCompleted"); }
public void onFetchFailed() { _campaignsAvailable = false; if (OnCampaignsFetchFailed != null) { OnCampaignsFetchFailed(); } UnityAdsExternal.Log("onFetchFailed"); }
private static void fillRewardItemKeyData() { string keyData = UnityAdsExternal.getRewardItemDetailsKeys(); if (keyData != null && keyData.Length > 2) { List <string> splittedKeyData = new List <string>(keyData.Split(';')); _rewardItemNameKey = splittedKeyData.ToArray().GetValue(0).ToString(); _rewardItemPictureKey = splittedKeyData.ToArray().GetValue(1).ToString(); } }
public static List <string> getRewardItemKeys() { List <string> retList = new List <string>(); if (_campaignsAvailable) { string keys = UnityAdsExternal.getRewardItemKeys(); retList = new List <string>(keys.Split(';')); } return(retList); }
// Token: 0x06000165 RID: 357 RVA: 0x0000510C File Offset: 0x0000330C private static void fillRewardItemKeyData() { string rewardItemDetailsKeys = UnityAdsExternal.getRewardItemDetailsKeys(); if (rewardItemDetailsKeys != null && rewardItemDetailsKeys.Length > 2) { List <string> list = new List <string>(rewardItemDetailsKeys.Split(new char[] { ';' })); UnityAds._rewardItemNameKey = list.ToArray().GetValue(0).ToString(); UnityAds._rewardItemPictureKey = list.ToArray().GetValue(1).ToString(); } }
public void onVideoCompleted(string parameters) { if (parameters != null) { List <string> splittedParameters = new List <string>(parameters.Split(';')); string rewardItemKey = splittedParameters.ToArray().GetValue(0).ToString(); bool skipped = splittedParameters.ToArray().GetValue(1).ToString() == "true" ? true : false; if (OnVideoCompleted != null) { OnVideoCompleted(rewardItemKey, skipped); } UnityAdsExternal.Log("onVideoCompleted: " + rewardItemKey + " - " + skipped); } }
// Token: 0x06000162 RID: 354 RVA: 0x00005084 File Offset: 0x00003284 public static bool show(string zoneId, string rewardItemKey, Dictionary <string, string> options) { if (!UnityAds.isShowing) { UnityAds.isShowing = true; if (UnityAds.SharedInstance) { string options2 = UnityAds.parseOptionsDictionary(options); if (UnityAdsExternal.show(zoneId, rewardItemKey, options2)) { return(true); } } } return(false); }
// Token: 0x0600015E RID: 350 RVA: 0x00004F08 File Offset: 0x00003108 public static Dictionary <string, string> getRewardItemDetailsWithKey(string rewardItemKey) { Dictionary <string, string> dictionary = new Dictionary <string, string>(); string text = string.Empty; text = UnityAdsExternal.getRewardItemDetailsWithKey(rewardItemKey); if (text != null) { List <string> list = new List <string>(text.Split(new char[] { ';' })); Utils.LogDebug("UnityAndroid: getRewardItemDetailsWithKey() rewardItemDataString=" + text); if (list.Count == 2) { dictionary.Add(UnityAds.getRewardItemNameKey(), list.ToArray().GetValue(0).ToString()); dictionary.Add(UnityAds.getRewardItemPictureKey(), list.ToArray().GetValue(1).ToString()); } } return(dictionary); }
public static Dictionary <string, string> getRewardItemDetailsWithKey(string rewardItemKey) { Dictionary <string, string> retDict = new Dictionary <string, string>(); string rewardItemDataString = ""; rewardItemDataString = UnityAdsExternal.getRewardItemDetailsWithKey(rewardItemKey); if (rewardItemDataString != null) { List <string> splittedData = new List <string>(rewardItemDataString.Split(';')); Utils.LogDebug("UnityAndroid: getRewardItemDetailsWithKey() rewardItemDataString=" + rewardItemDataString); if (splittedData.Count == 2) { retDict.Add(getRewardItemNameKey(), splittedData.ToArray().GetValue(0).ToString()); retDict.Add(getRewardItemPictureKey(), splittedData.ToArray().GetValue(1).ToString()); } } return(retDict); }
public static bool show(string zoneId, string rewardItemKey, Dictionary <string, string> options) { if (!_adsShow && _campaignsAvailable) { if (SharedInstance) { string optionsString = parseOptionsDictionary(options); if (UnityAdsExternal.show(zoneId, rewardItemKey, optionsString)) { if (OnShow != null) { OnShow(); } _adsShow = true; return(true); } } } return(false); }
/* Static Methods */ public static bool isSupported() { return(UnityAdsExternal.isSupported()); }
public static string getDefaultRewardItemKey() { return(UnityAdsExternal.getDefaultRewardItemKey()); }
public static string getCurrentRewardItemKey() { return(UnityAdsExternal.getCurrentRewardItemKey()); }
public static void setDefaultRewardItemAsRewardItem() { UnityAdsExternal.setDefaultRewardItemAsRewardItem(); }
public static bool setRewardItemKey(string rewardItemKey) { return(UnityAdsExternal.setRewardItemKey(rewardItemKey)); }