void TabFTPGUI() { EditorTools.DrawHeader("Info", true); EditorTools.BeginContents(false); GUILayout.Label("< Local Target Directory > " + EditorABSetting.GetBuildExportFullPath()); GUILayout.Label("< FTP Target Directory > " + FTP.GetAddress() + EditorABSetting.strExportPath + "/" + EditorABSetting.emBuildTarget.ToString() + "/"); EditorTools.EndContents(); EditorTools.DrawHeader("FTP Login", true); string tempAddress = FTP.ftpAddress; DrawFTPLogin("FTP Address", ref FTP.ftpAddress); if (tempAddress != FTP.ftpAddress) { FTP.SaveLoinInfo(); } string tempID = FTP.Id; DrawFTPLogin("ID", ref FTP.Id); if (tempID != FTP.Id) { FTP.SaveLoinInfo(); } GUILayout.BeginHorizontal(); GUILayout.Label("PASSWORD", GUILayout.Width(80f)); GUILayout.Space(5f); string tempPwd = EditorGUILayout.PasswordField(FTP.Password); GUI.backgroundColor = Color.white; GUILayout.EndHorizontal(); if (tempPwd != FTP.Password) { FTP.Password = tempPwd; FTP.SaveLoinInfo(); } EditorTools.BeginContents(false); GUILayout.BeginHorizontal(); GUI.backgroundColor = Color.cyan; GUILayout.Space(20f); if (GUILayout.Button("AssetBundle Upload to FTP")) { if (FTP.ftpAddress.Length < 10) { msg_log = "FtpServer Name - A minimum of 20 characters or more !"; } else if (FTP.Id.Length < 2) { msg_log = "FtpId Name - A minimum of 2 characters or more !"; } else if (FTP.Password.Length < 2) { msg_log = "FtpPassworkd Name - A minimum of 2 characters or more !"; } else { if (!FTP.FindFileFormFTPDirectory(EditorABSetting.strExportPath)) { FTP.MakeDirectoryFromFTP(EditorABSetting.strExportPath); } if (!FTP.FindFileFormFTPDirectory(EditorABSetting.emBuildTarget.ToString(), EditorABSetting.strExportPath + "/")) { FTP.MakeDirectoryFromFTP(EditorABSetting.strExportPath + "/" + EditorABSetting.emBuildTarget.ToString()); } FTP.UploadtoLocalDirectory(EditorABSetting.GetBuildExportFullPath(), EditorABSetting.strExportPath + "/" + EditorABSetting.emBuildTarget.ToString() + "/"); } } if (GUILayout.Button("Directory FTP")) { if (!FTP.FindFileFormFTPDirectory(EditorABSetting.strExportPath)) { FTP.MakeDirectoryFromFTP(EditorABSetting.strExportPath); } if (!FTP.FindFileFormFTPDirectory(EditorABSetting.emBuildTarget.ToString(), EditorABSetting.strExportPath + "/")) { FTP.MakeDirectoryFromFTP(EditorABSetting.strExportPath + "/" + EditorABSetting.emBuildTarget.ToString()); } ftp_filelist = FTP.FileListFormFTPDirectoryDetails2(EditorABSetting.GetBuildPipelineOutPath()); if (ftp_filelist != null) { ftpFiles = true; } else { ftpFiles = false; } } GUILayout.Space(20f); GUI.backgroundColor = Color.white; GUILayout.EndHorizontal(); EditorTools.EndContents(); GUILayout.BeginHorizontal(); GUILayout.Space(3f); GUILayout.BeginVertical(); mScroll = GUILayout.BeginScrollView(mScroll); if (EditorTools.DrawHeader("AssetBundle Local Files", true)) { DrawBundleLocalFiles(); } GUILayout.BeginHorizontal(); GUILayout.Label(" "); GUILayout.EndHorizontal(); if (ftp_filelist != null && EditorTools.DrawHeader("FTP Upload Files", false)) { DrawBundleFTPFileDetails(ftp_filelist); } GUILayout.EndScrollView(); GUILayout.EndVertical(); GUILayout.Space(3f); GUILayout.EndHorizontal(); }
void TabMakerGUI() { InfoHeaderGUI(); //----------------------------- EditorTools.DrawHeader("Build Bundle", true); EditorTools.BeginContents(false); DrawSettingItem("Build Export Folder Name", ref EditorABSetting.strExportPath, EditorABSetting.DEF_EXPORT_PATH); GUILayout.BeginHorizontal(); BuildAssetBundleOptions emOpt = (BuildAssetBundleOptions)EditorTools.EnumPopup("BuildOptions", EditorABSetting.emBuildOptions, Color.green, false); if (emOpt != EditorABSetting.emBuildOptions) { EditorABSetting.emBuildOptions = emOpt; } EditorABSetting.eBUILDTARGET emTarget = (EditorABSetting.eBUILDTARGET)EditorTools.EnumPopup("BuildTarget", EditorABSetting.emBuildTarget, Color.green, false); if (emTarget != EditorABSetting.emBuildTarget) { EditorABSetting.emBuildTarget = emTarget; } GUILayout.EndHorizontal(); EditorTools.EndContents(); //----------------------------- EditorTools.DrawHeader("AssetBundle Maker", true); EditorTools.BeginContents(false); GUILayout.BeginHorizontal(); GUI.backgroundColor = Color.cyan; GUILayout.Space(20f); if (GUILayout.Button("Add AssetBundle Folder")) { msg_log = EditorABManager.MarkFolderInFiles(EditorUtility.OpenFolderPanel("Add a Assets", EditorABSetting.GetProjectPath() + "/Assets", "Select Folder")); GUILayout.Space(20f); GUI.backgroundColor = Color.white; GUILayout.EndHorizontal(); return; } if (GUILayout.Button("Add AssetBundle File")) { msg_log = EditorABManager.MarkInFile(EditorUtility.OpenFilePanel("Add a Assets", EditorABSetting.GetProjectPath() + "/Assets", "*.*")); GUILayout.Space(20f); GUI.backgroundColor = Color.white; GUILayout.EndHorizontal(); return; } GUILayout.Space(20f); GUI.backgroundColor = Color.white; GUILayout.EndHorizontal(); EditorTools.EndContents(); // 번들 리스트 채크. string[] all = AssetDatabase.GetAllAssetBundleNames(); EditorTools.DrawHeader("AssetBundle Build", true); EditorTools.BeginContents(false); if (all.Length > 0) { GUILayout.BeginHorizontal(); GUI.backgroundColor = Color.magenta; GUILayout.Space(20f); if (GUILayout.Button("Export AssetBundles")) { EditorABSetting.CreateExoprtFolder(); CleanUnUsedBundleName(); BuildPipeline.BuildAssetBundles(EditorABSetting.GetBuildPipelineOutPath(), EditorABSetting.GetBuildPipelineOptions(), EditorABSetting.GetBuildPipelineTarget()); EditorABSetting.SaveConfigFile(); return; } GUILayout.Space(20f); GUI.backgroundColor = Color.white; GUILayout.EndHorizontal(); } EditorTools.EndContents(); // 번들 리스트 채크. if (all.Length > 0) { GUILayout.BeginHorizontal(); GUILayout.Space(3f); GUILayout.BeginVertical(); mScroll = GUILayout.BeginScrollView(mScroll); for (int i = 0; i < all.Length; i++) { string[] childs = AssetDatabase.GetAssetPathsFromAssetBundle(all[i]); if (DrawABList(i, all[i], childs.Length, false)) { for (int j = 0; j < childs.Length; j++) { GUILayout.Space(-1f); int highlight = (j % 2);// (selected == j); GUI.backgroundColor = highlight == 1 ? Color.white : new Color(0.6f, 0.6f, 0.6f); GUILayout.BeginHorizontal("AS TextArea", GUILayout.MinHeight(20f)); GUI.backgroundColor = Color.white; GUILayout.Label(j.ToString(), GUILayout.Width(24f)); if (GUILayout.Button(childs[j], "OL TextField", GUILayout.Height(20f))) { msg_log = childs[j]; } GUILayout.EndHorizontal(); } } } GUILayout.EndScrollView(); GUILayout.EndVertical(); GUILayout.Space(3f); GUILayout.EndHorizontal(); } }