void OnGUIProfileMode() { EditorGUILayout.Space(); AdGUIHelper.BeginSessionGroup(); AdGUIHelper.Session("Profile Mode"); if (AdGUIHelper.HeaderButton(InforIcon)) { AdGUIHelper.ShowMessage(AdString.profile_mode_infor); } AdGUIHelper.EndSessionGroup(); AdGUIHelper.BeginGroupedControls(); EditorGUI.indentLevel++; Settings.localConfig.interstitialProfileMode = (ProfileMode)EditorGUILayout.EnumPopup("Interstitial", Settings.localConfig.interstitialProfileMode); Settings.localConfig.rewardedProfileMode = (ProfileMode)EditorGUILayout.EnumPopup("Rewarded Video", Settings.localConfig.rewardedProfileMode); Settings.localConfig.bannerProfileMode = (ProfileMode)EditorGUILayout.EnumPopup("Banner", Settings.localConfig.bannerProfileMode); EditorGUI.indentLevel--; AdGUIHelper.EndGroupedControls(); }
void OnGUIRemoteConfig() { EditorGUILayout.Space(); AdGUIHelper.BeginSessionGroup(); AdGUIHelper.Session("Remote Config"); if (AdGUIHelper.HeaderButton(InforIcon)) { AdGUIHelper.ShowMessage(AdString.remote_config_infor); } AdGUIHelper.EndSessionGroup(); AdGUIHelper.BeginGroupedControls(); EditorGUI.indentLevel++; EditorGUILayout.HelpBox(AdString.data_config_version_warn.Text, MessageType.None); Settings.ActiveRemoteConfig = EditorGUILayout.Toggle("Active", Settings.ActiveRemoteConfig); if (Settings.ActiveRemoteConfig) { Settings.RemoteConfigUrl = EditorGUILayout.TextField("Json Config Url", Settings.RemoteConfigUrl).Trim(); } EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Data Version", AdConfig.DATA_VERSION.ToString()); if (GUILayout.Button("Export to Json", longButtonOptions)) { ExportConfigToFile(); } EditorGUILayout.EndHorizontal(); EditorGUI.indentLevel--; AdGUIHelper.EndGroupedControls(); }
public static string TextFieldInfor(string label, string value, Texture texture, Pharse pharse) { EditorGUILayout.BeginHorizontal(); var newValue = EditorGUILayout.TextField(label, value).Trim(); if (GUILayout.Button(new GUIContent(texture), EditorStyles.label, GUILayout.Width(20f))) { AdGUIHelper.ShowMessage(pharse); } EditorGUILayout.EndHorizontal(); return(newValue); }
void OnGUIInterstitialRules() { EditorGUILayout.Space(); AdGUIHelper.BeginSessionGroup(); AdGUIHelper.Session("Interstitial"); if (AdGUIHelper.HeaderButton(InforIcon)) { AdGUIHelper.ShowMessage(AdString.interstitial_limit_infor); } AdGUIHelper.EndSessionGroup(); AdGUIHelper.BeginGroupedControls(); EditorGUI.indentLevel++; Settings.localConfig.IsTimeLimited = EditorGUILayout.Toggle(new GUIContent("Time Limit", AdString.interstitial_time_limit_tooltip.Text), Settings.localConfig.IsTimeLimited); if (Settings.localConfig.IsTimeLimited) { EditorGUILayout.BeginVertical(); EditorGUI.indentLevel++; Settings.localConfig.DelayInterstitialFromFristOpen = EditorGUILayout.FloatField(new GUIContent("First Open Delay", AdString.first_open_delay_tooltip.Text), Settings.localConfig.DelayInterstitialFromFristOpen); Settings.localConfig.DelayInterstitialFromStartApp = EditorGUILayout.FloatField(new GUIContent("Start Delay", AdString.start_delay_tooltip.Text), Settings.localConfig.DelayInterstitialFromStartApp); Settings.localConfig.BetweenInterstitialLimited = EditorGUILayout.FloatField(new GUIContent("Between 2 Ads", AdString.between_2ads_tooltip.Text), Settings.localConfig.BetweenInterstitialLimited); EditorGUI.indentLevel--; EditorGUILayout.EndVertical(); } Settings.localConfig.IsSkipInterstitial = EditorGUILayout.Toggle(new GUIContent("Skip Interstitial", AdString.skip_inerstitial_tooltip.Text), Settings.localConfig.IsSkipInterstitial); if (Settings.localConfig.IsSkipInterstitial) { EditorGUILayout.BeginVertical(); EditorGUI.indentLevel++; Settings.localConfig.SkipInterstitialStep = EditorGUILayout.IntField(new GUIContent("Step", AdString.skip_inerstitial_tooltip.Text), Settings.localConfig.SkipInterstitialStep); EditorGUI.indentLevel--; EditorGUILayout.EndVertical(); } Settings.localConfig.RequiredInternetConnection = AdGUIHelper.Toggle(Settings.localConfig.RequiredInternetConnection, AdString.required_connection_label, AdString.required_connection_tooltip); EditorGUI.indentLevel--; AdGUIHelper.EndGroupedControls(); }
void OnGUITestModes() { EditorGUILayout.Space(); AdGUIHelper.BeginSessionGroup(); AdGUIHelper.Session("Test Mode"); if (AdGUIHelper.HeaderButton(InforIcon)) { AdGUIHelper.ShowMessage(AdString.test_mode_infor); } AdGUIHelper.EndSessionGroup(); AdGUIHelper.BeginGroupedControls(); EditorGUI.indentLevel++; EditorGUILayout.HelpBox(AdString.debug_warning.Text, MessageType.None); Settings.AdMobDebug = EditorGUILayout.Toggle("Admob Debug", Settings.AdMobDebug); Settings.UnityAdDebug = EditorGUILayout.Toggle("Unity Ad Debug", Settings.UnityAdDebug); EditorGUI.indentLevel--; AdGUIHelper.EndGroupedControls(); }
void ProfileSetting() { EditorGUI.indentLevel = 0; EditorGUILayout.Space(); AdGUIHelper.BeginSessionGroup(); AdGUIHelper.Session("Android"); if (AdGUIHelper.HeaderButton(InforIcon)) { AdGUIHelper.ShowMessage(AdString.profile_infor); } AdGUIHelper.EndSessionGroup(); AdGUIHelper.BeginGroupedControls(); EditorGUI.indentLevel++; ProviderListDrawer(AdType.Interstitial, Settings.localConfig.InterstitialAndroid); ProviderListDrawer(AdType.Rewarded, Settings.localConfig.RewardAndroid); ProviderListDrawer(AdType.Banner, Settings.localConfig.BannerAndroid); EditorGUI.indentLevel--; AdGUIHelper.EndGroupedControls(); AdGUIHelper.BeginSessionGroup(); AdGUIHelper.Session("iOS"); if (AdGUIHelper.HeaderButton(InforIcon)) { AdGUIHelper.ShowMessage(AdString.profile_infor); } AdGUIHelper.EndSessionGroup(); AdGUIHelper.BeginGroupedControls(); EditorGUI.indentLevel++; ProviderListDrawer(AdType.Interstitial, Settings.localConfig.InterstitialIOS); ProviderListDrawer(AdType.Rewarded, Settings.localConfig.RewardIOS); ProviderListDrawer(AdType.Banner, Settings.localConfig.BannerIOS); EditorGUI.indentLevel--; AdGUIHelper.EndGroupedControls(); }