Esempio n. 1
0
        void OnGUIAdmobInterstitialSettings()
        {
            AdGUIHelper.BeginSessionGroup();
            AdGUIHelper.Session("Interstitials");
            if (AdGUIHelper.HeaderButton(AddIcon))
            {
                Settings.localConfig.admobInterstitials.Add(new AdmobInterstitialAdUnit(""));
            }
            AdGUIHelper.EndSessionGroup();

            AdGUIHelper.BeginGroupedControls();
            if (Settings.localConfig.admobInterstitials.Count > 0)
            {
                for (int i = 0; i < Settings.localConfig.admobInterstitials.Count; i++)
                {
                    var ad = Settings.localConfig.admobInterstitials[i];
                    OnAdmobInterstitialAdUnit(ad, Settings.localConfig.admobInterstitials);
                }
            }
            else
            {
                AdGUIHelper.Help(AdString.empty_list_hint);
            }
            AdGUIHelper.EndGroupedControls();
        }
Esempio n. 2
0
        void OnFbNativeSettings()
        {
            AdGUIHelper.BeginSessionGroup();
            AdGUIHelper.Session("Native Ads");
            if (AdGUIHelper.HeaderButton(AddIcon))
            {
                Settings.localConfig.fbNativeAds.Add(new FBNativeAdUnit(""));
            }
            AdGUIHelper.EndSessionGroup();

            AdGUIHelper.BeginGroupedControls();
            if (Settings.localConfig.fbNativeAds.Count > 0)
            {
                for (int i = Settings.localConfig.fbNativeAds.Count - 1; i >= 0; i--)
                {
                    var ad = Settings.localConfig.fbNativeAds[i];
                    OnFbNativeAdUnit(ad, Settings.localConfig.fbNativeAds);
                }
            }
            else
            {
                AdGUIHelper.Help(AdString.empty_list_hint);
            }
            AdGUIHelper.EndGroupedControls();
        }
Esempio n. 3
0
        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();
        }
Esempio n. 4
0
        void OnGUIAdmobBanner()
        {
            AdGUIHelper.BeginSessionGroup();
            AdGUIHelper.Session("Banners");
            if (AdGUIHelper.HeaderButton(AddIcon))
            {
                Settings.localConfig.AdmobBannerUnits.Add(new AdmobBannerUnit(""));
            }
            AdGUIHelper.EndSessionGroup();

            AdGUIHelper.BeginGroupedControls();
            if (Settings.localConfig.AdmobBannerUnits.Count > 0)
            {
                EditorGUILayout.BeginVertical();
                for (int i = 0; i < Settings.localConfig.AdmobBannerUnits.Count; i++)
                {
                    var banner = Settings.localConfig.AdmobBannerUnits[i];
                    OnGUIAdmobBannerAdUnit(banner, Settings.localConfig.AdmobBannerUnits);
                }
                EditorGUILayout.EndVertical();
            }
            else
            {
                AdGUIHelper.Help(AdString.empty_list_hint);
            }
            AdGUIHelper.EndGroupedControls();
        }
Esempio n. 5
0
        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();
        }
Esempio n. 6
0
        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();
        }
Esempio n. 7
0
        void OnGUIAdvancedOptions()
        {
            AdGUIHelper.BeginSessionGroup();
            AdGUIHelper.Session("Advanced");
            AdGUIHelper.EndSessionGroup();

            AdGUIHelper.BeginGroupedControls();
            EditorGUI.indentLevel++;
            Settings.ActiveZeroTimeScale = EditorGUILayout.Toggle(new GUIContent("Zero TimeScale Ads", AdString.zero_timescale_tooltip.Text),
                                                                  Settings.ActiveZeroTimeScale);
            EditorGUI.indentLevel--;
            AdGUIHelper.EndGroupedControls();
        }
Esempio n. 8
0
        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();
        }
Esempio n. 9
0
        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();
        }