///////////////////////////////////////// public static void DrawGUI() { //E.Load(); P.Load(); var targetGroupList = PlatformUtils.GetSupportList(); ScopeIsCompile.Begin(); ScopeVertical.Begin(); HEditorGUILayout.HeaderTitle("Platform"); GUILayout.Space(8); foreach (var t in targetGroupList) { ScopeChange.Begin(); var _b = HEditorGUILayout.ToggleBox(P.GetPlatform(t).enable, t.Icon(), t.GetName()); if (ScopeChange.End()) { P.GetPlatform(t).enable = _b; P.Save(); BuildAssistWindow.ChangeActiveTarget(); } } ScopeVertical.End(); ScopeIsCompile.End(); }
public static void DrawGUI() { E.Load(); P.Load(); var targetGroupList = PlatformUtils.GetSupportList(); ScopeIsCompile.Begin(); ScopeVertical.Begin(); HEditorGUILayout.HeaderTitle("Platform"); GUILayout.Space(8); foreach (var t in targetGroupList) { ScopeChange.Begin(); var _b = HEditorGUILayout.ToggleBox(P.i.supportPlatform[(int)t], t.Icon(), t.GetName()); if (ScopeChange.End()) { P.i.supportPlatform[(int)t] = _b; P.Save(); //BuildAssistWindow.ChangeActiveTarget(); Utils.m_treeView_EditorSymbols = null; } } ScopeVertical.End(); ScopeIsCompile.End(); }
static void DrawContentPlatfom() { EditorGUI.BeginChangeCheck(); var targetGroupList = PlatformUtils.GetSupportList(); GUILayout.BeginVertical(EditorStyles.helpBox); GUILayout.Label(S._Selectplatformtouse); foreach (var t in targetGroupList) { EditorGUI.BeginChangeCheck(); var _b = HEditorGUILayout.ToggleLeft(P.GetPlatform(t).enable, t.Icon(), t.GetName()); if (EditorGUI.EndChangeCheck()) { P.GetPlatform(t).enable = _b; BuildAssistWindow.ChangeActiveTarget(); } } GUILayout.EndVertical(); if (EditorGUI.EndChangeCheck()) { s_changed = true; } }
//public void Reinit() => Init(); public void Init() { s_window = this; P.Load(); m_currentPlatform = null; m_supportBuildTarget = PlatformUtils.GetSupportList(); _enableAssetBundle = EditorHelper.HasMenuItem(Window_AssetBundle_Browser); _enableBuildReport = EditorHelper.HasMenuItem(Window_Show_Build_Report); MakeDrawBuildTarget(); OnFocus(); }
public static void ChangeActiveTarget() { if (!P.GetPlatform(P.i.selectBuildTargetGroup).enable) { //int cur = (int)P.i.selectBuildTargetGroup; var lst = PlatformUtils.GetSupportList(); int cur = lst.IndexOf(P.i.selectBuildTargetGroup); bool finded = false; int idx = cur - 1; while (0 <= idx) { if (P.GetPlatform(lst[idx]).enable) { finded = true; goto find; } idx--; } idx = cur + 1; while (idx < lst.Count) { if (P.GetPlatform(lst[idx]).enable) { finded = true; goto find; } idx++; } find: if (finded) { P.i.selectBuildTargetGroup = lst[idx]; } else { P.i.selectBuildTargetGroup = BuildTargetGroup.Unknown; } P.Save(); } s_window.MakeDrawBuildTarget(); Repaint(); }
static EditorToolbar() { E.Load(); var lst = new List <BuildTargetInfo>(); foreach (var p in PlatformUtils.GetSupportList()) { lst.Add(new BuildTargetInfo(p, p.Icon())); } #if UNITY_2019_3_OR_NEWER #else lst.Add(new BuildTargetInfo(BuildTargetGroup.Facebook, Icon.Get("BuildSettings.Facebook"))); #endif s_buildTargetInfo = lst.ToArray(); ToolbarExtender.LeftToolbarGUI.Add(OnLeftToolbarGUI); ToolbarExtender.RightToolbarGUI.Add(OnRightToolbarGUI); MakeMenuCommand(); }
static EditorToolbar() { //E.Load(); s_buildTargetInfo = new List <BuildTargetInfo>(64); foreach (var p in PlatformUtils.GetSupportList()) { s_buildTargetInfo.Add(new BuildTargetInfo(p, p.Icon())); } if (!UnitySymbol.UNITY_2019_3_OR_NEWER) { s_buildTargetInfo.Add(new BuildTargetInfo(BuildTargetGroup.Facebook, EditorIcon.buildsettings_facebook_small)); } ToolbarExtender.LeftToolbarGUI.Add(OnLeftToolbarGUI); ToolbarExtender.RightToolbarGUI.Add(OnRightToolbarGUI); #if UNITY_2021_1_OR_NEWER EditorApplication.update += add; #endif }
//public void Reinit() => Init(); public void Init() { s_window = this; s_window.SetTitle(new GUIContent(Package.nameNicify, EditorIcon.buildsettings_psm_small)); m_Drawer_ScenesInBuild = new GUI_BuildScenes(); m_Drawer_BuildPlatforms = new GUI_BuildProperty(); P.Load(); Utils.s_currentPlatform = null; m_supportBuildTarget = PlatformUtils.GetSupportList(); //_enableAssetBundle = EditorHelper.HasMenuItem( Window_AssetBundle_Browser ); _enableBuildReport = EditorHelper.HasMenuItem(Window_Show_Build_Report); MakeDrawBuildTarget(); OnFocus(); Utils.SelectItemUpdate(); ChangeActiveTarget(); m_Drawer_BuildPlatforms.SelectPlatform(Utils.s_currentPlatform, m_buildPlatformDrawer); }