Ejemplo 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();
        }
Ejemplo 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();
        }
Ejemplo 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();
        }
Ejemplo 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();
        }
Ejemplo 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();
        }
Ejemplo n.º 6
0
 private void OnGUIAdmobRewarded()
 {
     AdGUIHelper.Session("Rewarded");
     AdGUIHelper.BeginGroupedControls();
     Settings.localConfig.AdmobAndroidRewarded = EditorGUILayout.TextField("Android Ad Unit", Settings.localConfig.AdmobAndroidRewarded).Trim();
     Settings.localConfig.AdmobIOSRewarded     = EditorGUILayout.TextField("iOS Ad Unit", Settings.localConfig.AdmobIOSRewarded).Trim();
     AdGUIHelper.EndGroupedControls();
 }
Ejemplo n.º 7
0
        void OnGUIEditorSetting()
        {
            EditorGUILayout.Space();
            AdGUIHelper.Session("Editor");

            AdGUIHelper.BeginGroupedControls();
            AdString.language = (Language)EditorGUILayout.EnumPopup(new GUIContent(AdString.language_label.Text, AdString.language_tooltip.Text), AdString.language);
            AdGUIHelper.EndGroupedControls();
        }
Ejemplo n.º 8
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();
        }
Ejemplo n.º 9
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();
        }
Ejemplo n.º 10
0
        void OnGUIConnections()
        {
            EditorGUILayout.Space();
            AdGUIHelper.Session("Connection");
            AdGUIHelper.BeginGroupedControls();
            EditorGUI.indentLevel++;

            Settings.localConfig.RequestTimeOut = AdGUIHelper.FloatField(Settings.localConfig.RequestTimeOut, AdString.request_timeout_label, AdString.request_timeout_tooltip);

            Settings.localConfig.AdExpiration = AdGUIHelper.FloatField(Settings.localConfig.AdExpiration, AdString.ad_expiration_label, AdString.ad_expiration_tooltip);

            EditorGUI.indentLevel--;
            AdGUIHelper.EndGroupedControls();
        }
Ejemplo n.º 11
0
        void OnGUIAbout()
        {
            AdGUIHelper.BeginGroupedControls();
            GUILayout.Space(10F);
            EditorGUILayout.LabelField("WELCOME");
            EditorGUILayout.TextField("Version " + AdString.VersionName + "\nThank you for purchasing Ads Master!");

            GUILayout.Space(10f);
            EditorGUILayout.LabelField("QUICK START");

            GUILayout.Space(5f);
            string step1 = "Step 1 - Import all of network SDK (such as Google Ads, Audience Network)";

            EditorGUILayout.TextArea(step1);

            GUILayout.Space(5f);
            string step2 = "Step 2 - Configure unit ids at Providers Tab";

            EditorGUILayout.TextArea(step2);

            GUILayout.Space(5f);
            string step3 = "Step 3 - Add networks you want to show up by priority at Profile Tab";

            EditorGUILayout.TextArea(step3);

            GUILayout.Space(5f);
            string step4 = "Step 4 - Control ads by simple code";

            step4 += "\nInterstitial\n>To show interstitial, invoke simple method \"AdsMaster.ShowInterstitial()\"." +
                     " Ads Master take care all loading interstitial progresses.";

            step4 += "\n\nBanner\nAds Master allow you show once banner per screen. It mean only one banner is visible in the same time." +
                     "\n>To show banner as soon as posible, invoke method \"AdsMaster.ShowBanner()\". Ads Master show it up when compatible banner is loaded." +
                     "\n>To hide banner, invoke method \"AdsMaster.HideBanner()\".";

            step4 += "\n\nRewarded Video" +
                     "\n>To check rewarded video if it loaded, use result of method \"AdsMaster.HasReward()\"." +
                     "\n>To show rewarded video and handle callback, invoke method \"AdsMaster.ShowReward(success => { if (success) coin++; });\".";
            EditorGUILayout.TextArea(step4);

            GUILayout.Space(10f);
            EditorGUILayout.LabelField("SUPPORT");
            EditorGUILayout.TextField("Email [email protected]");
            EditorGUILayout.TextField("Group Skype https://join.skype.com/Q5GQFaTzipna");
            GUILayout.Space(20f);
            AdGUIHelper.EndGroupedControls();
        }
Ejemplo n.º 12
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();
        }
Ejemplo n.º 13
0
        void OnGUIVungleSetting()
        {
            EditorGUILayout.BeginVertical();
            EditorGUILayout.BeginHorizontal();
            AdGUIHelper.AvailableIcon(AdsMasterProcessor.vungleDetector.IsValid, AvailableIcon, NotAvailableIcon);
            Settings.IsVungleActived = AdGUIHelper.ActiveToggle(Settings.IsVungleActived, ToggleOnIcon, ToggleOffIcon);
            GUILayout.FlexibleSpace();
            if (AdGUIHelper.Button(DashboardIcon, AdString.open_dashboard_btn_hint))
            {
                Application.OpenURL("https://dashboard.vungle.com/dashboard/accounts/pub");
            }
            if (AdGUIHelper.Button(DownloadIcon, AdString.download_sdk_btn_hint))
            {
                Application.OpenURL("https://v.vungle.com/sdk");
            }
            EditorGUILayout.EndHorizontal();
            GUILayout.Space(4f);
            if (Settings.IsVungleActived)
            {
                EditorGUILayout.BeginVertical();
                AdGUIHelper.Session("Android");
                AdGUIHelper.BeginGroupedControls();
                EditorGUI.indentLevel++;
                Settings.localConfig.VungleAndroidAppId = EditorGUILayout.TextField("App Id", Settings.localConfig.VungleAndroidAppId).Trim();
                Settings.localConfig.VungleAndroidDefaultPlacementId = EditorGUILayout.TextField("Default Placement Id", Settings.localConfig.VungleAndroidDefaultPlacementId).Trim();
                EditorGUI.indentLevel--;
                AdGUIHelper.EndGroupedControls();

                AdGUIHelper.Session("iOS");
                AdGUIHelper.BeginGroupedControls();
                EditorGUI.indentLevel++;
                Settings.localConfig.VungleIOSAppId = EditorGUILayout.TextField("App Id", Settings.localConfig.VungleIOSAppId).Trim();
                Settings.localConfig.VungleIOSDefaultPlacementId = EditorGUILayout.TextField("Default Placement Id", Settings.localConfig.VungleIOSDefaultPlacementId).Trim();
                EditorGUI.indentLevel--;
                AdGUIHelper.EndGroupedControls();

                EditorGUILayout.EndVertical();
            }
            EditorGUILayout.EndVertical();
        }
Ejemplo n.º 14
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();
        }
Ejemplo n.º 15
0
        void OnGUIUnityAdSetting()
        {
            EditorGUILayout.BeginVertical();

            EditorGUILayout.BeginHorizontal();
            Settings.IsUnityAdActived = AdGUIHelper.ActiveToggle(Settings.IsUnityAdActived, ToggleOnIcon, ToggleOffIcon);
            GUILayout.FlexibleSpace();
            if (AdGUIHelper.Button(DashboardIcon, AdString.open_dashboard_btn_hint))
            {
                Application.OpenURL("https://operate.dashboard.unity3d.com/");
            }
            EditorGUILayout.EndHorizontal();

            GUILayout.Space(4f);
            if (Settings.IsUnityAdActived)
            {
                AdGUIHelper.Session("Android");
                AdGUIHelper.BeginGroupedControls();
                EditorGUI.indentLevel++;
                Settings.localConfig.UnityAdIdAndroid = EditorGUILayout.TextField("Android Id", Settings.localConfig.UnityAdIdAndroid).Trim();
                Settings.localConfig.UnityAdAndroidVideoPlacementId    = EditorGUILayout.TextField("Video Placement Id", Settings.localConfig.UnityAdAndroidVideoPlacementId).Trim();
                Settings.localConfig.UnityAdAndroidRewardedPlacementId = EditorGUILayout.TextField("Rewarded Placement Id", Settings.localConfig.UnityAdAndroidRewardedPlacementId).Trim();
                EditorGUI.indentLevel--;
                AdGUIHelper.EndGroupedControls();

                AdGUIHelper.Session("iOS");
                AdGUIHelper.BeginGroupedControls();
                EditorGUI.indentLevel++;
                Settings.localConfig.UnityAdIdIOS = EditorGUILayout.TextField("Game Id", Settings.localConfig.UnityAdIdIOS).Trim();
                Settings.localConfig.UnityAdIOSVideoPlacementId    = EditorGUILayout.TextField("Video Placement Id", Settings.localConfig.UnityAdIOSVideoPlacementId).Trim();
                Settings.localConfig.UnityAdIOSRewardedPlacementId = EditorGUILayout.TextField("Rewarded Placement Id", Settings.localConfig.UnityAdIOSRewardedPlacementId).Trim();
                EditorGUI.indentLevel--;
                AdGUIHelper.EndGroupedControls();
            }
            EditorGUILayout.EndVertical();
        }