Exemple #1
0
    public static void QuickHandle(string arch)
    {
        //打包AssetBundle到StreamingAssetsPath
        AssetBundleBuider.BuildAll();
        //拷贝lua到StreamingAssetsPath
        ToLuaMenu.CopyLuaFilesToStreaming();
        //对lua代码加密
        LuaToBytecode(arch, GameConst.streamingPath);

        //生成md5列表文件
        DirectoryInfo md5Folder = new DirectoryInfo(GameConst.streamingPath);
        //创建filelist.txt
        var          utf8WithoutBom = new System.Text.UTF8Encoding(false);
        FileStream   fileStream     = new FileStream(GameConst.streamingPath + "/" + GameConst.filelistName, FileMode.Create);
        StreamWriter fileWriter     = new StreamWriter(fileStream, utf8WithoutBom);

        CreateFileList(md5Folder, fileWriter, "");
        //保存文件
        fileWriter.Flush();
        fileWriter.Close();
        fileStream.Close();

        //拷贝一份到Persistent
        DirectoryInfo bundleFolder = new DirectoryInfo(GameConst.streamingPath);

        Function.OverDirectory(bundleFolder, GameConst.persistentPath);
    }