static AndroidNetworks() { var instance = new AndroidNetworks(); instance.ApplyChanges( instance.IsEnabled(), instance.GetNetworks(), instance.AreDebugNotificationsEnabled()); }
static void Update() { bool refresh = false; if (EditorUserBuildSettings.development != isDevelopment) { isDevelopment = EditorUserBuildSettings.development; refresh = true; } #if UNITY_5_5_OR_NEWER var newVersion = PlayerSettings.iOS.targetOSVersionString.ToString(); #elif UNITY_5_OR_NEWER var newVersion = PlayerSettings.iOS.targetOSVersionString.ToString().Substring(4).Replace('_', '.'); #else var newVersion = PlayerSettings.iOS.targetOSVersion.ToString().Substring(4).Replace('_', '.'); #endif if (!newVersion.Equals(iosMinTargetVersion)) { iosMinTargetVersion = newVersion; refresh = true; } if (refresh) { Networks instance = new AndroidNetworks(); instance.ApplyChanges( instance.IsEnabled(), instance.GetNetworks(), isDevelopment && instance.AreDebugNotificationsEnabled()); var smartAdsOn = instance.IsEnabled(); isDebugNotifications = isDevelopment && instance.AreDebugNotificationsEnabled(); instance = new IosNetworks(); instance.ApplyChanges( instance.IsEnabled(), instance.GetNetworks(), isDevelopment && instance.AreDebugNotificationsEnabled()); smartAdsOn = smartAdsOn && instance.IsEnabled(); isDebugNotifications = isDebugNotifications && instance.AreDebugNotificationsEnabled(); if (smartAdsOn) { DefineSymbolsHelper.Add(DefineSymbolsHelper.SMARTADS); } else { DefineSymbolsHelper.Remove(DefineSymbolsHelper.SMARTADS); } if (isDevelopment) { if (isDebugNotifications) { DefineSymbolsHelper.Add(DefineSymbolsHelper.DEBUG_NOTIFICATIONS); } else { DefineSymbolsHelper.Remove(DefineSymbolsHelper.DEBUG_NOTIFICATIONS); } } else { DefineSymbolsHelper.Remove(DefineSymbolsHelper.DEBUG_NOTIFICATIONS); } } }