void AssetBundleGUI() { _cfg.isKeepManifest = GUILayout.Toggle(_cfg.isKeepManifest, "保留「.manifest」文件", GUILayout.Width(150)); _cfg.abHotResDir = GUIFolderSelect.OnGUI("热更资源目录(仅该目录下的资源会作为AssetBundle发布):", 500, _cfg.abHotResDir, Application.dataPath, "hot_res", (path) => { path = path.Replace(Application.dataPath, ""); if (false == path.StartsWith("/")) { ShowNotification(new GUIContent("请选择Assets下的目录")); path = ""; } else { path = "Assets" + path; } return(path); }); }
void DllGUI() { _cfg.ilScriptDir = GUIFolderSelect.OnGUI("Dll开发目录:", 200, _cfg.ilScriptDir, Application.dataPath, "", (path) => { path = "Assets" + path.Replace(Application.dataPath, ""); return(path); }); _cfg.ilProjDir = GUIFolderSelect.OnGUI("Dll项目目录", 200, _cfg.ilProjDir, Application.dataPath, ""); _cfg.ilProjCsprojPath = GUIFileSelect.OnGUI("Dll项目csproj文件:", 200, _cfg.ilProjCsprojPath, Application.dataPath, "csproj"); GUILayout.BeginHorizontal(); GUILayout.Label("Devenv工具地址:", GUILayout.Width(200)); _cfg.devenvPath = EditorGUILayout.TextField(_cfg.devenvPath); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (GUILayout.Button("代码拷贝到项目目录")) { if (EditorUtility.DisplayDialog("警告!", "是否确认执行(目标目录将被覆盖)", "Yes", "No")) { _model.Copy2DllProj(); ShowNotification(new GUIContent("完成")); } } if (GUILayout.Button("打开DLL项目目录")) { ZeroEditorUtil.OpenDirectory(Path.GetDirectoryName(_cfg.ilProjCsprojPath)); } GUILayout.EndHorizontal(); }