public void DrawHotReLoadUI() { GUILayout.BeginHorizontal("HelpBox"); EditorGUILayout.LabelField("== 热重载 =="); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (GUILayout.Button("重载配置表", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { //仅仅是重载编译后的配置表 SettingsManager.AllSettingsReload(); } if (GUILayout.Button("快速编译配置表", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { SettingModuleEditor.QuickCompileSettings(); } if (GUILayout.Button("编译配置表并生成代码", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { SettingModuleEditor.CompileSettings(); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (GUILayout.Button("重载UI的Lua代码", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { KSFrameworkEditor.ReloadLuaCache(); } if (GUILayout.Button("重新打开UI", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { KSFrameworkEditor.ReloadUILua(); } if (GUILayout.Button("重新加载并打开UI", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { KSFrameworkEditor.ReloadUI(); } GUILayout.EndHorizontal(); }
public void DrawKEngineUI() { GUILayout.BeginHorizontal("HelpBox"); EditorGUILayout.LabelField("== UI相关辅助 =="); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (GUILayout.Button("创建UI", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { KUGUIBuilder.CreateNewUI(); } if (GUILayout.Button("为当前UI创建Lua脚本", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { KSFrameworkEditor.AutoMakeUILuaScripts(); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (GUILayout.Button("导出当前UI", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { KUGUIBuilder.ExportCurrentUI(); } if (GUILayout.Button("导出全部UI", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { KUGUIBuilder.ExportAllUI(); } GUILayout.EndHorizontal(); }
public void DrawKEngineUI() { GUILayout.BeginHorizontal("HelpBox"); EditorGUILayout.LabelField("== UI相关辅助 =="); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (GUILayout.Button("创建常规UI", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { KUGUIBuilder.CreateNormalUI(); } #if xLua || SLUA if (GUILayout.Button("为当前UI创建Lua脚本", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { KSFrameworkEditor.AutoMakeUILuaScripts(); } #endif GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (GUILayout.Button("创建主界面UI", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { KUGUIBuilder.CreateMainUI(); } if (GUILayout.Button("创建Tips界面", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { KUGUIBuilder.CreateTipsUI(); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (GUILayout.Button("导出当前UI", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { KUGUIBuilder.ExportCurrentUI(); } if (GUILayout.Button("导出全部UI", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { KUGUIBuilder.ExportAllUI(); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (GUILayout.Button("导出公共图集", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { KUGUIBuilder.BuildCommonAtlas(); } GUILayout.EndHorizontal(); }
public void DrawHotReLoadUI() { GUILayout.BeginHorizontal("HelpBox"); EditorGUILayout.LabelField("== 热重载 =="); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (GUILayout.Button("重载配置表", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { SettingsManager.AllSettingsReload(); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (GUILayout.Button("快速编译配置表", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { SettingModuleEditor.QuickCompileSettings(); } if (GUILayout.Button("编译配置表并生成代码", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { SettingModuleEditor.CompileSettings(); } GUILayout.EndHorizontal(); #if xLua || SLUA GUILayout.BeginHorizontal(); if (GUILayout.Button("重载所有UI的Lua代码", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { KSFrameworkEditor.ReloadAllUIScript(); } if (GUILayout.Button("重新打开所有UI", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { KSFrameworkEditor.ReloadAllUI(); } GUILayout.EndHorizontal(); GUILayout.Space(10); GUILayout.BeginHorizontal(); EditorGUILayout.LabelField("UI名字:", GUILayout.Width(40)); reloadUIScript = EditorGUILayout.TextField(reloadUIScript, GUILayout.MinWidth(120), GUILayout.MaxHeight(30)); panelType = (PanelType)EditorGUILayout.EnumPopup("", panelType, GUILayout.MinWidth(80), GUILayout.MinHeight(30)); if (panelType != PanelType.HeadInfoUI && Application.isPlaying) { topUI = UIModule.Instance.GetTopUI(panelType); //Log.Info($"now top ui:{topUI?.UIName}"); if (topUI != null) { reloadUIScript = topUI.UIName; } } if (GUILayout.Button("重载Lua脚本", GUILayout.MinWidth(100), GUILayout.MaxHeight(30))) { KSFrameworkEditor.ReloadUIScript(reloadUIScript); } GUILayout.EndHorizontal(); #endif GUILayout.Space(10); GUILayout.BeginHorizontal(); EditorGUILayout.LabelField("UI名字:", GUILayout.Width(40)); reloadUIAb = EditorGUILayout.TextField(reloadUIAb, GUILayout.MinWidth(120), GUILayout.MaxHeight(30)); if (GUILayout.Button("重载AB并打开", GUILayout.MinWidth(100), GUILayout.MaxHeight(30))) { KSFrameworkEditor.ReloadUIAB(reloadUIAb); } GUILayout.EndHorizontal(); //GUILayout.Space(10); }
public void DrawHotReLoadUI() { GUILayout.BeginHorizontal("HelpBox"); EditorGUILayout.LabelField("== 热重载 =="); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (GUILayout.Button("重载配置表", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { //TODO 仅仅是重载编译后的配置表 //SettingsManager.AllSettingsReload(); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (GUILayout.Button("快速编译配置表", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { SettingModuleEditor.QuickCompileSettings(); } if (GUILayout.Button("编译配置表并生成代码", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { SettingModuleEditor.CompileSettings(); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (GUILayout.Button("重载所有UI的Lua代码", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { KSFrameworkEditor.ReloadAllUIScript(); } if (GUILayout.Button("重新打开所有UI", GUILayout.ExpandWidth(true), GUILayout.MaxHeight(30))) { KSFrameworkEditor.ReloadAllUI(); } GUILayout.EndHorizontal(); GUILayout.Space(10); GUILayout.BeginHorizontal(); EditorGUILayout.LabelField("UI名字:", GUILayout.Width(40)); reloadUIScript = EditorGUILayout.TextField(reloadUIScript, GUILayout.MinWidth(120), GUILayout.MaxHeight(30)); if (GUILayout.Button("重载Lua脚本", GUILayout.MinWidth(100), GUILayout.MaxHeight(30))) { KSFrameworkEditor.ReloadUIScript(reloadUIScript); } GUILayout.EndHorizontal(); GUILayout.Space(10); GUILayout.BeginHorizontal(); EditorGUILayout.LabelField("UI名字:", GUILayout.Width(40)); reloadUIAb = EditorGUILayout.TextField(reloadUIAb, GUILayout.MinWidth(120), GUILayout.MaxHeight(30)); if (GUILayout.Button("重载AB并打开", GUILayout.MinWidth(100), GUILayout.MaxHeight(30))) { KSFrameworkEditor.ReloadUIAB(reloadUIAb); } GUILayout.EndHorizontal(); //GUILayout.Space(10); }