Esempio n. 1
0
    private void OnGUI()
    {
        if (GUILayout.Button("Compress"))
        {
            url = EditorUtility.OpenFolderPanel("test", "", "");
            string[] files = Directory.GetFiles(url, "*.cs", SearchOption.AllDirectories);
            ZipTask.StartCompress(url, files, Application.streamingAssetsPath + "/" + Path.GetFileName(url) + ".zip");
            AssetDatabase.Refresh();
        }

        if (GUILayout.Button("Uncompress"))
        {
            url = EditorUtility.OpenFilePanel("test", "", "");
            ZipTask.StartDecompress(url);
            AssetDatabase.Refresh();
        }

        this.Repaint();
    }
Esempio n. 2
0
    public static void StartCompress(string url, string[] inputPaths, string outputPath)
    {
        ZipTask task = new ZipTask();

        task.Compress(url, inputPaths, outputPath);
    }
Esempio n. 3
0
    public static void StartDecompress(string decompressfile)
    {
        ZipTask task = new ZipTask();

        task.Decompress(decompressfile);
    }