void DisplayRateUsSettings() { #if VSRATE EditorWindowUtils.Space(2); rateUsSettings.isRateUsFoldoutOpened = EditorGUILayout.Foldout(rateUsSettings.isRateUsFoldoutOpened, "RATE US SETTINGS"); if (rateUsSettings.isRateUsFoldoutOpened) { EditorWindowUtils.Space(1); EditorGUILayout.LabelField("Number of Stars to Accept Review"); rateUsSettings.numberOfStarsToAcceptReview = EditorGUILayout.Slider(rateUsSettings.numberOfStarsToAcceptReview, 1f, 5f, GUILayout.Width(250)); EditorWindowUtils.Space(1); EditorWindowUtils.CreateLabelField(ref rateUsSettings.email, "email", "The email adress"); EditorWindowUtils.CreateLabelField(ref rateUsSettings.subject, "subject", "The subect of the email"); EditorWindowUtils.CreateLabelField(ref rateUsSettings.body, "body", "The body of the email"); } if (GUI.changed) { EditorUtility.SetDirty(rateUsSettings); } #endif }
public static void ShowAsUtility() { var wnd = CreateInstance <SetWindowSizeDialog>(); EditorWindowUtils.CenterOnMainWindow(wnd); wnd.ShowUtility(); }
void DisplayGIFSettings() { #if VSGIF EditorWindowUtils.Space(2); gifSettings.isGIFFoldoutOpened = EditorGUILayout.Foldout(gifSettings.isGIFFoldoutOpened, "GIFs SETTINGS"); if (gifSettings.isGIFFoldoutOpened) { EditorWindowUtils.Space(2); gifSettings.width = EditorGUILayout.IntSlider("Width", gifSettings.width, 8, 4096, GUILayout.Width(400)); gifSettings.framePerSecond = EditorGUILayout.IntSlider("Frame Per Second", gifSettings.framePerSecond, 1, 30, GUILayout.Width(400)); gifSettings.repeat = EditorGUILayout.IntSlider("Repeat", gifSettings.repeat, -1, 10, GUILayout.Width(400)); gifSettings.quality = EditorGUILayout.IntSlider("Quality", gifSettings.quality, 1, 100, GUILayout.Width(400)); gifSettings.bufferSize = EditorGUILayout.Slider("Buffer Size", gifSettings.bufferSize, 0.1f, 10f, GUILayout.Width(400)); gifSettings.WorkerPriority = (MyThreadPriority)EditorGUILayout.EnumPopup("Worker Priority", gifSettings.WorkerPriority, GUILayout.Width(300)); } if (GUI.changed) { EditorUtility.SetDirty(gifSettings); } #endif }
public void OnGUI() { if (releaseNotesText == null) { releaseNotesText = Resources.Load <TextAsset>("RELEASE").text; } if (changeLogStyle == null) { changeLogStyle = new GUIStyle(EditorStyles.textArea) { richText = true }; } isChangelogFoldOut = EditorWindowUtils.Foldout(isChangelogFoldOut, "Release Notes"); if (isChangelogFoldOut) { using (new EditorGUILayout.HorizontalScope()) { EditorWindowUtils.Space(10); using (new EditorGUILayout.VerticalScope()) { scrollPosition = EditorWindowUtils.DrawScrollableSelectableLabel( scrollPosition, changelogWidth, releaseNotesText, changeLogStyle); } } } }
void DisplayCommonSettings() { EditorWindowUtils.Space(2); commonAppSettings.isCommonFoldoutOpened = EditorGUILayout.Foldout(commonAppSettings.isCommonFoldoutOpened, "COMMON SETTINGS"); if (commonAppSettings.isCommonFoldoutOpened) { EditorWindowUtils.Space(2); ANDROID_AMAZON = EditorGUILayout.BeginToggleGroup(EditorWindowUtils.CreateGUIContentFromDescriptionAndTooltip("ANDROID_AMAZON", "check it if you want to target the Amazon app shop"), ANDROID_AMAZON); EditorGUILayout.EndToggleGroup(); EditorWindowUtils.CreateLabelField(ref commonAppSettings.iOS_ID, "iOS ID", "The iOS ID of your app"); EditorWindowUtils.CreateLabelField(ref commonAppSettings.amazon_ID, "Amazon ID", "The Amazon ID of your app"); EditorWindowUtils.CreateLabelField(ref commonAppSettings.shareTextBeforeUrl, "Share Text before URL", "The Text you want to display before your UR"); EditorWindowUtils.CreateLabelField(ref commonAppSettings.shareTextAfterUrl, "Share Text after URL", "The Text you want to display after your URL"); } if (GUI.changed) { EditorUtility.SetDirty(commonAppSettings); } }
void OnGUI() { #if !UNITY_IOS && !UNITY_ANDROID EditorWindowUtils.Space(5); EditorGUILayout.LabelField("PLEASE SWITCH PLATFORM TO iOS OR ANDROID IN THE BUILD SETTINGS"); EditorWindowUtils.Space(5); return; #endif scrollPos = EditorGUILayout.BeginScrollView(scrollPos); DisplayCommonSettings(); DisplayGIFSettings(); DislayAdsSettings(); DisplayLeaderboardSettings(); DisplayRateUsSettings(); DisplayShareSettings(); EditorWindowUtils.Space(2); EditorGUILayout.EndScrollView(); }
static void Button_AssetStore() { var image = #if UNITY_2020_1_OR_NEWER EditorIcon.package_manager; #else EditorIcon.asset_store; #endif var tooltip = #if UNITY_2020_1_OR_NEWER "Package Manager"; #else S._OpenAssetStore; #endif var windowT = #if UNITY_2020_1_OR_NEWER UnityTypes.UnityEditor_PackageManager_UI_PackageManagerWindow; #else UnityTypes.UnityEditor_AssetStoreWindow; #endif if (GUILayout.Button(EditorHelper.TempContent(image, tooltip), s_styles.Button, GUILayout.Width(s_styles.IconButtonSize))) { EditorWindowUtils.ShowWindow(windowT, EE.IsUtilityWindow(windowT)); } }
private void Title() { var versionAsset = Resources.Load <TextAsset>("VERSION"); EditorWindowUtils.TitleTexture(_bannerImage); if (versionAsset == null) { return; } if (centeredStyle == null) { centeredStyle = new GUIStyle(GUI.skin.label) { alignment = TextAnchor.MiddleCenter, fontSize = 16 }; } EditorWindowUtils.Space(5); EditorWindowUtils.Label(String.Format("Version: {0}", versionAsset.text), centeredStyle); if (pageNames == null) //use case: About Window is open while entering Play { Open(); } EditorWindowUtils.BeginHorizontalCenter(); EditorWindowUtils.Button(() => { GetWindow <LeiaRecommendedSettings>(true); }, "Leia Recommended Settings"); EditorWindowUtils.EndHorizontalCenter(); EditorWindowUtils.Space(10); _page = (Page)GUILayout.Toolbar((int)_page, pageNames); EditorWindowUtils.HorizontalLine(); EditorWindowUtils.Space(5); }
private void OnGUI() { Title(); EditorWindowUtils.BeginVertical(); scrollPosition = EditorWindowUtils.BeginScrollView(scrollPosition); switch (_page) { case Page.Welcome: welcomeWindow.OnGUI(); break; case Page.Release_Notes: releaseNotesWindow.OnGUI(); break; case Page.Log_Settings: logSettingsWindow.OnGUI(); break; default: welcomeWindow.OnGUI(); break; } EditorWindowUtils.EndScrollView(); EditorWindowUtils.EndVertical(); EditorWindowUtils.Space(10); UndoableInputFieldUtils.BoolFieldWithTooltip(() => { forceShow = EditorPrefs.GetBool(editor_About_ForcePopUp, false); return(forceShow); }, b => { forceShow = b; EditorPrefs.SetBool(editor_About_ForcePopUp, b); }, " Automatically Pop-up", "Display this window when opening Unity. Alternatively, this widow can be opened from LeiaLoft-> About", window); EditorWindowUtils.Space(10); }
internal static void SetMainWindowSize(int w, int h) { var pos = EditorWindowUtils.GetEditorMainWindowPos(); pos.width = w; pos.height = h; EditorWindowUtils.SetEditorMainWindowPos(pos); }
public void DefaultLayoutContainsTutorialWindow() { TutorialManager.SaveOriginalWindowLayout(); TutorialManager.LoadWindowLayout(TutorialContainer.k_DefaultLayoutPath); bool hasTutorialWindow = EditorWindowUtils.FindOpenInstance <TutorialWindow>(); TutorialManager.RestoreOriginalWindowLayout(); Assert.IsTrue(hasTutorialWindow, $"{TutorialContainer.k_DefaultLayoutPath} does not contain TutorialWindow."); }
void Header() { string headline = header_title; string body = header_content; EditorWindowUtils.Space(20); EditorGUILayout.LabelField(headline, headlineStyle, GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(false), GUILayout.MinHeight(20f)); EditorWindowUtils.Space(20); GUILayout.Label(body, EditorStyles.wordWrappedLabel); EditorWindowUtils.Space(20); }
public void OnGUI() { EditorWindowUtils.BeginVertical(); if (targetPlatforms == null) { targetPlatforms = new BuildTargetGroup[] { BuildTargetGroup.Android, BuildTargetGroup.Standalone }; } foreach (var grp in targetPlatforms) { EnumLogLevel(grp); } EditorWindowUtils.Space(5); EditorWindowUtils.EndVertical(); }
public void Display() { if (HorizontalLine) { EditorWindowUtils.HorizontalLine(); } EditorWindowUtils.BeginHorizontal(); EditorWindowUtils.Label(Title, Tooltip, true); EditorWindowUtils.FlexibleSpace(); EditorWindowUtils.Button(ButtonAction, ButtonLabel); EditorWindowUtils.EndHorizontal(); EditorWindowUtils.Space(5); GUILayout.Label(Decsription, EditorStyles.wordWrappedLabel); EditorWindowUtils.Space(5); }
//void OnDisable() { // var tilemap = self.GetComponent<Tilemap>(); // if( tilemap ) { // tilemap.color = ColorUtils.Alpha( tilemap.color, 1.0f ); // } //} public override void OnInspectorGUI() { base.OnInspectorGUI(); var tilemap = self.GetComponent <Tilemap>(); if (tilemap) { EditorGUILayout.LabelField("Tilemap", EditorStyles.boldLabel); EditorGUI.BeginChangeCheck(); var a = EditorGUILayout.Slider("Alpha", tilemap.color.a, 0.00f, 1.00f); if (EditorGUI.EndChangeCheck()) { tilemap.color = ColorUtils.RGBA(tilemap.color, a); } } #if ENABLE_TILEMAP var window = EditorWindowUtils.Find(UnityTypes.UnityEditor_Tilemaps_GridPaintPaletteWindow); if (window == null) { return; } var clipboardView = window.GetProperty <object>("clipboardView"); var _tileBase = clipboardView.GetProperty <TileBase>("activeTile"); if (_tileBase != m_tileBase) { m_tileBase = _tileBase; m_tileBaseEditor = Editor.CreateEditor(m_tileBase); } if (m_tileBaseEditor != null) { ScopeVertical.Begin(EditorStyles.helpBox); ScopeHorizontal.Begin(); EditorGUILayout.LabelField("Active Tile", EditorStyles.boldLabel); GUILayout.FlexibleSpace(); if (GUILayout.Button("Delete")) { UnityObject.DestroyImmediate(_tileBase, true); } ScopeHorizontal.End(); m_tileBaseEditor.OnInspectorGUI(); ScopeVertical.End(); } #endif }
public void Display(bool HeaderHorizonatalLine) { if (HeaderHorizonatalLine) { EditorWindowUtils.HorizontalLine(); } EditorWindowUtils.BeginHorizontal(); IsExpanded = EditorGUILayout.Foldout(IsExpanded, Title, true); EditorWindowUtils.EndHorizontal(); EditorWindowUtils.HorizontalLine(); if (IsExpanded) { for (int i = 0; i < Elements.Count; i++) { Elements[i].Display(); } } }
///////////////////////////////////////// internal static void ShowWindowButton(Type editorWindowType, string text, Texture2D image) { if (editorWindowType == null) { return; } var _window = EditorWindowUtils.Find(editorWindowType); if (_window != null) { return; } if (ShowSideButton(text, image)) { var window = EditorWindowUtils.ShowWindow(editorWindowType); window.titleContent = new GUIContent(text, window.titleContent.image); } }
public bool UIDraw(Rect rect, P.Params currentParams) { if (!HEditorGUI.IconButton(rect.W(16), EditorIcon.settings)) { return(false); } if (PB.i.enableOldStyleProjectSettings) { Selection.activeObject = AssetDatabase.LoadAssetAtPath <UnityObject>(AssetDatabase.GUIDToAssetPath("00000000000000004000000000000000")); EditorWindowUtils.Find(UnityTypes.UnityEditor_InspectorWindow)?.Focus(); } else { //UnityEditorMenu.Edit_Project_Settings(); UnityEditorSettingsWindow.Show(SettingsScope.Project, "Project/Player"); } return(false); }
///////////////////////////////////////// static void OnSelectionChanged() { #if ENABLE_TILEMAP s_tileOn = false; #endif if (!E.i.tools) { return; } if (Selection.activeGameObject == null) { return; } #if ENABLE_TILEMAP if (Selection.activeGameObject.GetComponent <Tilemap>()) { s_tileOn = true; } if (Selection.activeGameObject.GetComponent <Grid>()) { s_tileOn = true; } if (Selection.activeGameObject.GetComponent <TilemapPallet>()) { var comp = Selection.activeGameObject.GetComponent <TilemapPallet>(); var window = EditorWindowUtils.Find(UnityTypes.UnityEditor_Tilemaps_GridPaintPaletteWindow); var t = UnityTypes.UnityEditor_Tilemaps_GridPalettes; var aa = t.GetProperty <List <GameObject> >("palettes"); var index = aa.FindIndex(x => x.name == comp.palletSettings.name); if (0 <= index) { window.MethodInvoke("SelectPalette", new object[] { index, comp.gameObject }); } } #endif }
static void EnumLogLevel(BuildTargetGroup grp) { EditorWindowUtils.Label(string.Format("{0} log level", grp), true); var defines = CompileDefineUtil.GetCompileDefinesWithPrefix(prefix, grp); LogLevel finalValue = LogLevel.Warning; foreach (var def in defines) { var enumValue = def.Substring(prefix.Length); finalValue = (LogLevel)System.Enum.Parse(typeof(LogLevel), enumValue, true); } var logLevel = (LogLevel)EditorWindowUtils.EnumPopup("Log Level", finalValue, GUILayout.Width(300)); if (logLevel != finalValue) { foreach (var def in defines) { CompileDefineUtil.RemoveCompileDefine(def, new[] { grp }); } CompileDefineUtil.AddCompileDefine(grp, string.Format("{0}{1}", prefix, logLevel).ToUpper(CultureInfo.InvariantCulture)); } }
void OnEnable() { singleton.asmdefGraphWindow = this; m_disableShadeMode = true; SetTitle("Asmdef Graph", EditorIcon.icons_processed_unityengine_ui_graphicraycaster_icon_asset); // view�̍쐬 graphView = new AsmdefGraphView() { style = { flexGrow = 1 } }; //graphView.transform rootVisualElement.Add(graphView); if (EditorWindowUtils.Find(typeof(CsFilesWindow)) == null) { GetWindow <CsFilesWindow>(); } if (EditorWindowUtils.Find(typeof(AsmdefFilesWindow)) == null) { GetWindow <AsmdefFilesWindow>(); } }
void DisplayShareSettings() { #if VS_SHARE EditorWindowUtils.Space(2); shareSettings.isShareFoldoutOpened = EditorGUILayout.Foldout(shareSettings.isShareFoldoutOpened, "SHARE SETTINGS"); if (shareSettings.isShareFoldoutOpened) { EditorWindowUtils.Space(2); EditorWindowUtils.CreateToggleField(ref shareSettings.androidForceSDCardPermission, "Android Force SDCard Permission", "Check it to force the SD Card Permission on Android"); EditorWindowUtils.CreateToggleField(ref shareSettings.showButtonShareWhenSceneRestartIfScreenshotAvailable, "Show Share Button When Scene Restart If Screenshot Available", "Check it to show the share button when the scene restarts ff the screenshot is available"); shareSettings.state = (ButtonShareState)EditorGUILayout.EnumPopup("Share Button State", shareSettings.state, GUILayout.Width(300)); } if (GUI.changed) { EditorUtility.SetDirty(shareSettings); } #endif }
public static void EditSettings() { EditorWindowUtils.OpenAndDockNextToInspector <FbEditorWindow>(); }
void DislayAdsSettings() { #if APPADVISORY_ADS EditorWindowUtils.Space(2); adIDs.isAdsFoldoutOpened = EditorGUILayout.Foldout(adIDs.isAdsFoldoutOpened, "ADS SETTINGS"); if (adIDs.isAdsFoldoutOpened) { EditorWindowUtils.Space(2); #region SDK BUTTONS EditorGUILayout.BeginHorizontal(); if (GUILayout.Button("GET\nADMOB\nSDK", GUILayout.Width(100), GUILayout.Height(50))) { Application.OpenURL("https://github.com/googleads/googleads-mobile-unity"); } if (GUILayout.Button("GET\nCHARTBOOST\nSDK", GUILayout.Width(100), GUILayout.Height(50))) { Application.OpenURL("https://answers.chartboost.com/hc/en-us/articles/201219745-Unity-SDK-Download"); } if (GUILayout.Button("GET\nADCOLONY\nSDK", GUILayout.Width(100), GUILayout.Height(50))) { Application.OpenURL("https://github.com/AdColony"); } if (GUILayout.Button("GET\nFACEBOOK\nSDK", GUILayout.Width(100), GUILayout.Height(50))) { Application.OpenURL("https://developers.facebook.com/docs/unity"); } EditorGUILayout.EndHorizontal(); #endregion #region ADS OPTIONS TOGGLES EditorWindowUtils.Space(2); DEBUG = EditorGUILayout.BeginToggleGroup(EditorWindowUtils.CreateGUIContentFromDescriptionAndTooltip("DEBUG", "Check it iif you want to debug rewarded ads"), DEBUG); EditorGUILayout.EndToggleGroup(); EditorWindowUtils.CreateToggleField(ref adIDs.LoadNextSceneWhenAdLoaded, "Load Next Scene When Ad(s) Ready ", "Check it if you want to use a loading scene and launch the game scene when ads are ready"); EditorWindowUtils.CreateToggleField(ref adIDs.RandomizeNetworks, "Randomize Networks", "Check it if you want to randomize the order of the networks"); EditorWindowUtils.CreateToggleField(ref adIDs.showInterstitialFirstRun, "Show interstitial at first run", "Check it if you want to display an Interstitial at the first run"); EditorWindowUtils.CreateToggleField(ref adIDs.showBannerAtRun, "Show banner at run", "Check it if you want to show banner at run"); EditorWindowUtils.CreateToggleField(ref adIDs.ShowIntertitialAtStart, "Show interstitial at start [?]", "Check it if you want to display interstitals ads at launch"); #endregion #region MEDIATION NETWORK TOGGLES adIDs.isMediationNetworkFoldoutOpened = EditorGUILayout.Foldout(adIDs.isMediationNetworkFoldoutOpened, "MEDIATION NETWORKS"); if (adIDs.isMediationNetworkFoldoutOpened) { EnableChartboost = EditorGUILayout.BeginToggleGroup(new GUIContent("Enable Chartboost [?]", "Check it to use Chartboost. Download the Chartboost SDK here: https://answers.chartboost.com/hc/en-us/"), EnableChartboost); EditorGUILayout.EndToggleGroup(); EnableAdcolony = EditorGUILayout.BeginToggleGroup(new GUIContent("Enable Adcolony [?]", "Check it to use ADColony. Download the Adcolony SDK here: https://github.com/AdColony"), EnableAdcolony); EditorGUILayout.EndToggleGroup(); EnableAdmob = EditorGUILayout.BeginToggleGroup(new GUIContent("Enable Admob [?]", "Check it to use Admob (iAD will be disabled)"), EnableAdmob); EditorGUILayout.EndToggleGroup(); EnableFacebook = EditorGUILayout.BeginToggleGroup(new GUIContent("Enable Facebook [?]", "Check it to use Facebook (iAD will be disabled)"), EnableFacebook); EditorGUILayout.EndToggleGroup(); } EditorWindowUtils.Space(2); #endregion #region ADS OPTION ENUM adIDs.interstitialNetworkToShowAtRun = (InterstitialNetwork)EditorGUILayout.EnumPopup("Interstitial network to show at run", adIDs.interstitialNetworkToShowAtRun, GUILayout.Width(300)); adIDs.bannerNetwork = (BannerNetwork)EditorGUILayout.EnumPopup("Banner network", adIDs.bannerNetwork, GUILayout.Width(300)); #if ENABLE_FACEBOOK || ENABLE_ADMOB adIDs.childrenPrivacy = (ChildrenPrivacy)EditorGUILayout.EnumPopup("Children's Privacy", adIDs.childrenPrivacy, GUILayout.Width(300)); #endif EditorWindowUtils.Space(2); #endregion #if ENABLE_FACEBOOK if (adIDs.bannerNetwork == BannerNetwork.Facebook) { adIDs.FacebookBannerSize = (AudienceNetwork.AdSize)EditorGUILayout.EnumPopup("Facebook Banner Size", adIDs.FacebookBannerSize, GUILayout.Width(300)); adIDs.FacebookBannerPosition = (FacebookBannerPosition)EditorGUILayout.EnumPopup("Facebook Banner Position", adIDs.FacebookBannerPosition, GUILayout.Width(300)); } #endif #if ENABLE_ADMOB EditorWindowUtils.CreateToggleField(ref adIDs.lookForGameAds, "Look for Game Ads", "Check it if you want to add Game as one of your ads keyword "); if (adIDs.bannerNetwork == BannerNetwork.Admob) { //adIDs.AdmobBannerSize = (GoogleMobileAds.Api.AdSize) EditorGUILayout.EnumPopup("Admob Banner Size", adIDs.AdmobBannerSize, GUILayout.Width(300)); adIDs.AdmobBannerPosition = (GoogleMobileAds.Api.AdPosition)EditorGUILayout.EnumPopup("Admob Banner Position", adIDs.AdmobBannerPosition, GUILayout.Width(300)); } #endif #region BANNER NETWORKS EditorWindowUtils.Space(2); adIDs.IsBannerNetworksOpened = EditorGUILayout.Foldout(adIDs.IsBannerNetworksOpened, "BANNER NETWORKS"); if (adIDs.IsBannerNetworksOpened) { #if ENABLE_ADMOB adIDs.useAdmobAsBannerNetwork = EditorGUILayout.BeginToggleGroup(new GUIContent("Admob [?]", "Check it if you want to use Admob as one of your BANNER network"), adIDs.useAdmobAsBannerNetwork); EditorGUILayout.EndToggleGroup(); #endif #if ENABLE_FACEBOOK adIDs.useFacebookAsBannerNetwork = EditorGUILayout.BeginToggleGroup(new GUIContent("Facebook [?]", "Check it if you want to use Facebook as one of your BANNER network"), adIDs.useFacebookAsBannerNetwork); EditorGUILayout.EndToggleGroup(); #endif } #endregion EditorWindowUtils.Space(2); adIDs.IsInterstitialNetworksOpened = EditorGUILayout.Foldout(adIDs.IsInterstitialNetworksOpened, "INTERSTITIAL NETWORKS"); if (adIDs.IsInterstitialNetworksOpened) { #if ENABLE_ADMOB adIDs.useAdmobAsInterstitialNetwork = EditorGUILayout.BeginToggleGroup(new GUIContent("Admob [?]", "Check it if you want to use Admob as one of your INTERSTITIAL network"), adIDs.useAdmobAsInterstitialNetwork); EditorGUILayout.EndToggleGroup(); #endif #if CHARTBOOST EditorWindowUtils.CreateToggleField(ref adIDs.useChartboostAsInterstitialNetwork, "Chartboost", "Check it if you want to use Chartboost as one of your INTERSTITIAL network"); #endif #if ENABLE_FACEBOOK adIDs.useFacebookAsInterstitialNetwork = EditorGUILayout.BeginToggleGroup(new GUIContent("Facebook [?]", "Check it if you want to use Facebook as one of your INTERSTITIAL network"), adIDs.useFacebookAsInterstitialNetwork); EditorGUILayout.EndToggleGroup(); #endif } EditorGUILayout.Space(); EditorGUILayout.Space(); adIDs.IsVideoNetworksOpened = EditorGUILayout.Foldout(adIDs.IsVideoNetworksOpened, "VIDEO NETWORKS"); if (adIDs.IsVideoNetworksOpened) { #if UNITY_ADS t.useUnityAdsAsBannerNetwork = EditorGUILayout.BeginToggleGroup(new GUIContent("Unity Ads [?]", "Check it if you want to use Unirt Ads as one of your VIDEO network"), t.useUnityAdsAsBannerNetwork); EditorGUILayout.EndToggleGroup(); #endif #if ENABLE_ADCOLONY EditorWindowUtils.CreateToggleField(ref adIDs.useAdColonyAsBannerNetwork, "AdColony", "Check it if you want to use AdColony as one of your VIDEO network"); #endif } EditorGUILayout.Space(); EditorGUILayout.Space(); adIDs.IsRewardedVideoNetworksOpened = EditorGUILayout.Foldout(adIDs.IsRewardedVideoNetworksOpened, "REWARDED VIDEO NETWORKS"); if (adIDs.IsRewardedVideoNetworksOpened) { #if ENABLE_ADMOB adIDs.useAdmobAsRewardedVideoNetwork = EditorGUILayout.BeginToggleGroup(new GUIContent("Admob [?]", "Check it if you want to use Admob as one of your REWARDED VIDEO network"), adIDs.useAdmobAsRewardedVideoNetwork); EditorGUILayout.EndToggleGroup(); #endif #if UNITY_ADS t.useUnityAdsAsRewardedVideoNetwork = EditorGUILayout.BeginToggleGroup(new GUIContent("Unity Ads [?]", "Check it if you want to use Unity Ads as one of your REWARDED VIDEO network"), t.useChartboostAsRewardedVideoNetwork); EditorGUILayout.EndToggleGroup(); #endif #if CHARTBOOST EditorWindowUtils.CreateToggleField(ref adIDs.useChartboostAsRewardedVideoNetwork, "Chartboost", "Check it if you want to use Chartboost as one of your REWARDED VIDEO network"); #endif #if ENABLE_ADCOLONY EditorWindowUtils.CreateToggleField(ref adIDs.useAdColonyAsRewardedVideoNetwork, "AdColony", "Check it if you want to use AdColony as one of your REWARDED VIDEO network"); #endif } EditorGUILayout.Space(); EditorGUILayout.Space(); #if ENABLE_ADMOB adIDs.IsAdmobSettingsOpened = EditorGUILayout.Foldout(adIDs.IsAdmobSettingsOpened, "ADMOB"); if (adIDs.IsAdmobSettingsOpened) { adIDs.IsAdmobIOSSettingsOpened = EditorGUILayout.Foldout(adIDs.IsAdmobIOSSettingsOpened, " iOS ADMOB IDs"); if (adIDs.IsAdmobIOSSettingsOpened) { EditorGUILayout.LabelField(new GUIContent("Admob Banner Id iOS [?]", "Please enter your Admob BANNER Id for iOS")); adIDs.AdmobBannerIdIOS = EditorGUILayout.TextArea(adIDs.AdmobBannerIdIOS); EditorGUILayout.LabelField(new GUIContent("Admob Interstitial Id iOS [?]", "Please enter your Admob INTERSTITIAL Id for iOS")); adIDs.AdmobInterstitialIdIOS = EditorGUILayout.TextArea(adIDs.AdmobInterstitialIdIOS); EditorGUILayout.LabelField(new GUIContent("Admob Rewarded Video Id iOS [?]", "Please enter your Admob REWARDED VIDEO Id for iOS")); adIDs.AdmobRewardedVideoIdIOS = EditorGUILayout.TextArea(adIDs.AdmobRewardedVideoIdIOS); } adIDs.IsAdmobANDROIDSettingsOpened = EditorGUILayout.Foldout(adIDs.IsAdmobANDROIDSettingsOpened, " ANDROID ADMOB IDs"); if (adIDs.IsAdmobANDROIDSettingsOpened) { EditorGUILayout.LabelField(new GUIContent("Admob Banner Id Android [?]", "Please enter your Admob BANNER Id for ANDROID")); adIDs.AdmobBannerIdANDROID = EditorGUILayout.TextArea(adIDs.AdmobBannerIdANDROID); EditorGUILayout.LabelField(new GUIContent("Admob Interstitial Id Android [?]", "Please enter your Admob INTERSTITIAL Id for ANDROID")); adIDs.AdmobInterstitialIdANDROID = EditorGUILayout.TextArea(adIDs.AdmobInterstitialIdANDROID); EditorGUILayout.LabelField(new GUIContent("Admob Rewarded Video Id Android [?]", "Please enter your Admob REWARDED VIDEO Id for Android")); adIDs.AdmobRewardedVideoIdANDROID = EditorGUILayout.TextArea(adIDs.AdmobRewardedVideoIdANDROID); } adIDs.IsAdmobAMAZONSettingsOpened = EditorGUILayout.Foldout(adIDs.IsAdmobAMAZONSettingsOpened, " ANDROID AMAZON IDs"); if (adIDs.IsAdmobAMAZONSettingsOpened) { EditorGUILayout.LabelField(new GUIContent("Admob Banner Id Amazon [?]", "Please enter your Admob BANNER Id for AMAZON - Could be the same as Android")); adIDs.AdmobBannerIdAMAZON = EditorGUILayout.TextArea(adIDs.AdmobBannerIdAMAZON); EditorGUILayout.LabelField(new GUIContent("Admob Interstitial Id Amazon [?]", "Please enter your Admob INTERSTITIAL Id for AMAZON - Could be the same as Android")); adIDs.AdmobInterstitialIdAMAZON = EditorGUILayout.TextArea(adIDs.AdmobInterstitialIdAMAZON); EditorGUILayout.LabelField(new GUIContent("Admob Rewarded Video Id Amazon [?]", "Please enter your Admob REWARDED VIDEO Id for Amazon")); adIDs.AdmobRewardedVideoIdAMAZON = EditorGUILayout.TextArea(adIDs.AdmobRewardedVideoIdAMAZON); } } EditorGUILayout.Space(); EditorGUILayout.Space(); #endif #if ENABLE_FACEBOOK adIDs.IsFacebookSettingsOpened = EditorGUILayout.Foldout(adIDs.IsFacebookSettingsOpened, "FACEBOOK"); if (adIDs.IsFacebookSettingsOpened) { adIDs.IsFacebookIOSSettingsOpened = EditorGUILayout.Foldout(adIDs.IsFacebookIOSSettingsOpened, " iOS FACEBOOK Placement IDs"); if (adIDs.IsFacebookIOSSettingsOpened) { EditorGUILayout.LabelField(new GUIContent("Facebook Banner Placement Id iOS [?]", "Please enter your Facebook BANNER Placement Id for iOS")); adIDs.FacebookBannerIdIOS = EditorGUILayout.TextArea(adIDs.FacebookBannerIdIOS); EditorGUILayout.LabelField(new GUIContent("Facebook Interstitial Placement Id iOS [?]", "Please enter your Facebbok INTERSTITIAL Placement Id for iOS")); adIDs.FacebookInterstitialIdIOS = EditorGUILayout.TextArea(adIDs.FacebookInterstitialIdIOS); } adIDs.IsFacebookANDROIDSettingsOpened = EditorGUILayout.Foldout(adIDs.IsFacebookANDROIDSettingsOpened, " ANDROID FACEBOOK Placement IDs"); if (adIDs.IsFacebookANDROIDSettingsOpened) { EditorGUILayout.LabelField(new GUIContent("Facebook Banner Placement Id Android [?]", "Please enter your Facebook BANNER Placement Id for ANDROID")); adIDs.FacebookBannerIdANDROID = EditorGUILayout.TextArea(adIDs.FacebookBannerIdANDROID); EditorGUILayout.LabelField(new GUIContent("Facebook Interstitial Placement Id Android [?]", "Please enter your Facebook INTERSTITIAL Placement Id for ANDROID")); adIDs.FacebookInterstitialIdANDROID = EditorGUILayout.TextArea(adIDs.FacebookInterstitialIdANDROID); } adIDs.IsFacebookAMAZONSettingsOpened = EditorGUILayout.Foldout(adIDs.IsFacebookAMAZONSettingsOpened, " AMAZON FACEBOOK Placement IDs"); if (adIDs.IsFacebookAMAZONSettingsOpened) { EditorGUILayout.LabelField(new GUIContent("Facebook Banner Placement Id Amazon [?]", "Please enter your Facebbok BANNER Placement Id for AMAZON")); adIDs.FacebookBannerIdAMAZON = EditorGUILayout.TextArea(adIDs.FacebookBannerIdAMAZON); EditorGUILayout.LabelField(new GUIContent("Facebook Interstitial Id Amazon [?]", "Please enter your Facebook INTERSTITIAL Placement Id for AMAZON")); adIDs.FacebookInterstitialIdAMAZON = EditorGUILayout.TextArea(adIDs.FacebookInterstitialIdAMAZON); } } #endif #if UNITY_ADS adIDs.IsUnityAdsSettingsOpened = EditorGUILayout.Foldout(adIDs.IsUnityAdsSettingsOpened, "UNITY ADS"); if (adIDs.IsUnityAdsSettingsOpened) { EditorGUILayout.LabelField(new GUIContent("Rewarded video zonèe unity ads [?]", "If you don't know what it is, have a look to the Unity Ads documentation: https://unityads.unity3d.com")); adIDs.rewardedVideoZoneUnityAds = EditorGUILayout.TextField(adIDs.rewardedVideoZoneUnityAds); } EditorGUILayout.Space(); EditorGUILayout.Space(); #endif EditorWindowUtils.Space(2); #if CHARTBOOST adIDs.IsChartboostSettingsOpened = EditorGUILayout.Foldout(adIDs.IsChartboostSettingsOpened, "Chartboost"); if (adIDs.IsChartboostSettingsOpened) { EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField(new GUIContent("Chartboost App ID iOS [?]", "Find it on Chartboost.com")); EditorGUILayout.LabelField(new GUIContent("Chartboost App Signature iOS [?]", "Find it on Chartboost.com")); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); adIDs.ChartboostAppIdIOS = EditorGUILayout.TextField(adIDs.ChartboostAppIdIOS); adIDs.ChartboostAppSignatureIOS = EditorGUILayout.TextField(adIDs.ChartboostAppSignatureIOS); EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); EditorGUILayout.Space(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField(new GUIContent("Chartboost App ID Android [?]", "Find it on Chartboost.com")); EditorGUILayout.LabelField(new GUIContent("Chartboost App Signature Android [?]", "Find it on Chartboost.com")); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); adIDs.ChartboostAppIdAndroid = EditorGUILayout.TextField(adIDs.ChartboostAppIdAndroid); adIDs.ChartboostAppSignatureAndroid = EditorGUILayout.TextField(adIDs.ChartboostAppSignatureAndroid); EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); EditorGUILayout.Space(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField(new GUIContent("Chartboost App ID Amazon [?]", "Find it on Chartboost.com")); EditorGUILayout.LabelField(new GUIContent("Chartboost App Signature Amazon [?]", "Find it on Chartboost.com")); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); adIDs.ChartboostAppIdAmazon = EditorGUILayout.TextField(adIDs.ChartboostAppIdAmazon); adIDs.ChartboostAppSignatureAmazon = EditorGUILayout.TextField(adIDs.ChartboostAppSignatureAmazon); EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); EditorGUILayout.Space(); } EditorGUILayout.Space(); EditorGUILayout.Space(); #endif #if ENABLE_ADCOLONY adIDs.IsADColonySettingsOpened = EditorGUILayout.Foldout(adIDs.IsADColonySettingsOpened, "ADCOLONY"); if (adIDs.IsADColonySettingsOpened) { #if ENABLE_ADCOLONY EditorGUILayout.LabelField(new GUIContent("ADColony App ID iOS [?]", "Please enter your ADColony App ID for iOS")); adIDs.AdColonyAppID_iOS = EditorGUILayout.TextField(adIDs.AdColonyAppID_iOS); EditorGUILayout.Space(); EditorGUILayout.Space(); EditorGUILayout.LabelField(new GUIContent("ADColony App ID ANDROID [?]", "Please enter your ADColony App ID for ANDROID")); adIDs.AdColonyAppID_ANDROID = EditorGUILayout.TextField(adIDs.AdColonyAppID_ANDROID); EditorGUILayout.Space(); EditorGUILayout.Space(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField(new GUIContent("ADColony Interstitial Video Zone Key iOS [?]", "ADColony Interstitial Video Zone Key iOS")); EditorGUILayout.LabelField(new GUIContent("ADColony Interstitial Video Zone ID iOS [?]", "ADColony Interstitial Video Zone ID iOS")); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); adIDs.AdColonyInterstitialVideoZoneKEY_iOS = EditorGUILayout.TextField(adIDs.AdColonyInterstitialVideoZoneKEY_iOS); adIDs.AdColonyInterstitialVideoZoneID_iOS = EditorGUILayout.TextField(adIDs.AdColonyInterstitialVideoZoneID_iOS); EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); EditorGUILayout.Space(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField(new GUIContent("ADColony Interstitial Video Zone Key Android [?]", "ADColony Interstitial Video Zone Key Android")); EditorGUILayout.LabelField(new GUIContent("ADColony Interstitial Video Zone ID Android [?]", "ADColony Interstitial Video Zone OD Android")); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); adIDs.AdColonyInterstitialVideoZoneKEY_ANDROID = EditorGUILayout.TextField(adIDs.AdColonyInterstitialVideoZoneKEY_ANDROID); adIDs.AdColonyInterstitialVideoZoneID_ANDROID = EditorGUILayout.TextField(adIDs.AdColonyInterstitialVideoZoneID_ANDROID); EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); EditorGUILayout.Space(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField(new GUIContent("ADColony Rewarded Video Zone Key iOS [?]", "ADColony Rewarded Video Zone Key iOS")); EditorGUILayout.LabelField(new GUIContent("ADColony Rewarded Video Zone ID iOS [?]", "ADColony Rewarded Video Zone ID iOS")); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); adIDs.AdColonyRewardedVideoZoneKEY_iOS = EditorGUILayout.TextField(adIDs.AdColonyRewardedVideoZoneKEY_iOS); adIDs.AdColonyRewardedVideoZoneID_iOS = EditorGUILayout.TextField(adIDs.AdColonyRewardedVideoZoneID_iOS); EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); EditorGUILayout.Space(); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField(new GUIContent("ADColony Rewarded Video Zone Key Android [?]", "ADColony Rewarded Video Zone Key Android")); EditorGUILayout.LabelField(new GUIContent("ADColony Rewarded Video Zone ID Android [?]", "ADColony Rewarded Video Zone OD Android")); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); adIDs.AdColonyRewardedVideoZoneKEY_ANDROID = EditorGUILayout.TextField(adIDs.AdColonyRewardedVideoZoneKEY_ANDROID); adIDs.AdColonyRewardedVideoZoneID_ANDROID = EditorGUILayout.TextField(adIDs.AdColonyRewardedVideoZoneID_ANDROID); EditorGUILayout.EndHorizontal(); EditorGUILayout.Space(); EditorGUILayout.Space(); #endif } #endif #if ENABLE_ADMOB || CHARTBOOST || IAD || ADCOLONY_INTERSTITIAL || ENABLE_FACEBOOK EditorGUILayout.Space(); EditorGUILayout.Space(); EditorGUILayout.Space(); EditorGUILayout.Space(); EditorGUILayout.Space(); EditorGUILayout.Space(); #endif } if (GUI.changed) { EditorUtility.SetDirty(adIDs); } #endif }
void DisplayLeaderboardSettings() { #if APPADVISORY_LEADERBOARD EditorWindowUtils.Space(2); leaderboardIDs.isLeaderboardIDsFoldoutOpened = EditorGUILayout.Foldout(leaderboardIDs.isLeaderboardIDsFoldoutOpened, "LEADERBOARD SETTINGS"); if (leaderboardIDs.isLeaderboardIDsFoldoutOpened) { if (leaderboardIDs.FIRST_TIME) { Debug.Log("*********** APP_ADVISORY_FIRST_TIME_LEADERBORD ***********"); PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.iOS, SetString("VSLEADERBOARD")); PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Android, SetString("VSLEADERBOARD")); leaderboardIDs.FIRST_TIME = false; } #region BUTTON EditorWindowUtils.Space(2); EditorGUILayout.BeginHorizontal(); if (GUILayout.Button("GET\nGoogle Play Game\nSDK", GUILayout.Width(150), GUILayout.Height(50))) { Application.OpenURL("https://github.com/playgameservices/play-games-plugin-for-unity"); } EditorGUILayout.EndHorizontal(); #endregion EditorWindowUtils.Space(2); Enable_iOS = EditorGUILayout.BeginToggleGroup(new GUIContent("Enable iOS Game Center [?]", "Activate if you want to use Game Center Leaderboard"), Enable_iOS); EditorGUILayout.EndToggleGroup(); Enable_Android = EditorGUILayout.BeginToggleGroup(new GUIContent("Enable Android Google Play Game Services [?]", "Activate if you want to use Google Play Game Services Leaderboard"), Enable_Android); EditorGUILayout.EndToggleGroup(); #if VSLEADERBOARD_ENABLE_IOS var stringIos = PlayerSettings.GetScriptingDefineSymbolsForGroup(BuildTargetGroup.iOS); if (!stringIos.Contains("APPADVISORY_LEADERBOARD")) { stringIos = "APPADVISORY_LEADERBOARD" + ";" + stringIos; PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.iOS, stringIos); } #endif #if VSLEADERBOARD_ENABLE_ANDROID var stringAndroid = PlayerSettings.GetScriptingDefineSymbolsForGroup(BuildTargetGroup.Android); if (!stringAndroid.Contains("APPADVISORY_LEADERBOARD")) { stringAndroid = "APPADVISORY_LEADERBOARD" + ";" + stringAndroid; PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Android, stringAndroid); } #endif EditorWindowUtils.Space(2); #if VSLEADERBOARD_ENABLE_IOS EditorGUILayout.LabelField(new GUIContent("Game Center Leaderboard Id [?]", "Find it on Itunes Connect console")); leaderboardIDs.LEADERBOARDID_IOS = EditorGUILayout.TextField(leaderboardIDs.LEADERBOARDID_IOS); #endif EditorWindowUtils.Space(2); #if VSLEADERBOARD_ENABLE_ANDROID EditorGUILayout.LabelField(new GUIContent("Google Play Game Leaderboard Id [?]", "Find it on Google Play Game console")); leaderboardIDs.LEADERBOARDID_ANDROID = EditorGUILayout.TextField(leaderboardIDs.LEADERBOARDID_ANDROID); #endif } if (GUI.changed) { EditorUtility.SetDirty(leaderboardIDs); } #endif }
public static void DrawGUI() { E.Load(); HEditorGUILayout.HeaderTitle(SS._General); if (m_localeNames == null) { m_localeNames = new List <EditorLocalize.LCIDString>(); // EditorLocalize.s_lcidTable.OrderBy( x => x.NAME ).ToList(); var files = "95cedfc7731853946b0b3650f175d73a".GetFilesFromAssetGUID().Select(x => x.FileNameWithoutExtension()).ToList(); foreach (var rp in files) { var p = EditorLocalize.s_lcidTable.Find(x => x.LCID == rp); if (p == null) { continue; } m_localeNames.Add(p); } m_localeNames = m_localeNames.OrderBy(x => x.NAME).ToList(); } ScopeChange.Begin(); var idx = m_localeNames.FindIndex(x => x.LCID == E.i.LCID); if (idx < 0) { idx = m_localeNames.FindIndex(x => x.LCID == "en-US"); } idx = EditorGUILayout.Popup(S._Language, idx, m_localeNames.Select(x => x.NAME).ToArray()); if (ScopeChange.End()) { E.i.LCID = m_localeNames[idx].LCID; E.LoadLocalize(); E.Save(); } ////////////////////////////////// ScopeChange.Begin(); GUILayout.Space(4); var _versionTextColor = EditorGUILayout.ColorField(S._VersionTextColor, E.i.versionTextColor.value); var _versionBackColor = EditorGUILayout.ColorField(S._VersionBackColor, E.i.versionBackColor.value); var _windowShade = HEditorGUILayout.ToggleLeft(S._WindowShade, E.i.m_windowShade); var _uielementsFontFix = HEditorGUILayout.ToggleLeft("UIElements Font Fix", E.i.m_uielementsFontFix); if (ScopeChange.End()) { E.i.versionTextColor.value = _versionTextColor; E.i.versionBackColor.value = _versionBackColor; E.i.m_windowShade = _windowShade; E.i.m_uielementsFontFix = _uielementsFontFix; E.Save(); EditorWindowUtils.RepaintProjectWindow(); } ////////////////////////////////// ScopeChange.Begin(); GUILayout.Space(8); HEditorGUILayout.HeaderTitle("AssetPostprocessor"); E.i.m_asmdefNameSync = HEditorGUILayout.ToggleLeft(S._MaketheNamefieldthesameasthefilenamewhenimportingasmdef, E.i.m_asmdefNameSync); ScopeDisable.Begin(true); E.i.m_asmdefAutoReferenceOFF = HEditorGUILayout.ToggleLeft(S._TurnoffAutoReferencedwhenimportingasmdef, E.i.m_asmdefAutoReferenceOFF); if (E.i.m_asmdefAutoReferenceOFF) { E.i.m_asmdefAutoReferenceOFF = false; E.Save(); } ScopeDisable.End(); //E.i.m_disableSyncVS = HEditorGUILayout.ToggleLeft( "Kill SyncVS", E.i.m_disableSyncVS ); //E.i.utilityWindow = EditorGUILayout.ToggleLeft( SS._UtilityWindowMode, E.i.utilityWindow ); if (ScopeChange.End()) { E.Save(); } ////////////////////////////////// GUILayout.Space(8); HEditorGUILayout.HeaderTitle(S._WheretosaveProjectsettings); HEditorGUILayout.PreviewFolder(E.i.GetProjectSettingsPath(), OnProjectFolderPreset); GUILayout.Space(8f); ScopeHorizontal.Begin(); GUILayout.FlexibleSpace(); if (GUILayout.Button(SS._ReturnToDefault)) { E.i.versionTextColor = new EditorColor(ColorUtils.RGB(72), ColorUtils.RGB(173)); E.i.versionBackColor = new EditorColor(ColorUtils.RGB(242), ColorUtils.RGB(41)); //E.i.utilityWindow = false; E.Save(); } ScopeHorizontal.End(); //HGUILayout.LinkLabel( "hoge" ); //#if ENABLE_HANANOKI_SETTINGS && LOCAL_TEST // using( new GUILayout.HorizontalScope() ) { // GUILayout.FlexibleSpace(); // if( GUILayout.Button( "Open Settings" ) ) { // SettingsWindow.Open(); // } // } //#endif }