Esempio n. 1
0
    /// <summary>
    /// 压缩文件
    /// </summary>
    public void PackerAssets()
    {
        // 打包资源文件成 UPK 压缩文件
        string tempPath = BuildConst.PackerPath;

        UtilityFile.CreateDirectory(tempPath);
        UtilityPacker.PackFolder(tempPath, BuildConst.PackerFilePath);

        AssetDatabase.Refresh();
    }
Esempio n. 2
0
    public void UploadAsset(string _serverName)
    {
        string tempPath    = BuildConst.BuildPackerPath;
        string tempLuaPath = BuildConst.BuildPackerFilePath;

        UtilityPacker.PackFolder(tempPath, tempLuaPath);

        string tempTargetPath = Application.dataPath + "/" + (EditorTool.Utility.GetVersionNumber(_serverName) + 1) + "_" + GetFileSize(tempLuaPath) + "_" + GetTime() + ".upk";

        File.Move(tempLuaPath, tempTargetPath);

        Upload(tempTargetPath, _serverName);
    }