Esempio n. 1
0
    public void DrawBundleLocalFiles()
    {
        // 번들 리스트 채크.
        DirectoryInfo dir = new DirectoryInfo(EditorABSetting.GetBuildExportFullPath());

        if (dir.Exists)
        {
            List <FileInfo> inFileList = new List <FileInfo>(dir.GetFiles("*.*", SearchOption.AllDirectories));
            if (inFileList.Count > 0)
            {
                for (int i = 0; i < inFileList.Count; i++)
                {
                    GUILayout.Space(-1f);
                    int highlight = (i % 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(i.ToString(), GUILayout.Width(24f));
                    GUILayout.Label(inFileList[i].Name, GUILayout.Width(250f));
                    float size     = inFileList[i].Length / 1000f;
                    int   fileSize = (size > 1f) ? (int)size : 1;
                    GUILayout.Label(fileSize + " KB", GUILayout.Width(100f));
                    GUILayout.Label(inFileList[i].LastWriteTime.ToString(), GUILayout.Width(180f));
                    GUILayout.EndHorizontal();
                }
            }
        }
    }
Esempio n. 2
0
    void InfoHeaderGUI()
    {
        EditorTools.DrawHeader("Info", true);
        EditorTools.BeginContents(false);

        GUI.contentColor = Color.white;
        GUILayout.Label("\u25BA Absolute Project Path >  " + EditorABSetting.GetProjectPath());
        GUILayout.Label("\u25BA Current Build Setting Platform >  " + EditorUserBuildSettings.activeBuildTarget.ToString());
        GUILayout.Label("\u25BA Selected Bundle Extenstion >  " + EditorABSetting.GetBundleExtenstion());
        GUILayout.Label("\u25BA BundleExport FullPath >  " + EditorABSetting.GetBuildExportFullPath());
        GUI.contentColor = Color.white;

        EditorTools.EndContents();
    }
Esempio n. 3
0
    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();
    }