Unity_移动端安卓解压缩Zip
欢迎使用Markdown编辑器
由于工作问题,需要开发unity安卓端解压zip功能,经过两天的研究简单的例子如下:
工具:unity2018.3.13 ,ICSharpCode.SharpZipLib.dll;
在unity中放入ICSharpCode.SharpZipLib.dll这个动态链接库,一般动态链接库放在项目目录中\Assets\Plugins目录下
基本代码:
using UnityEngine;
using System.Collections;
using System;
using System.IO;
using ICSharpCode.SharpZipLib.Checksums;
using ICSharpCode.SharpZipLib.Zip;
using UnityEditor;
public class zip1 : MonoBehaviour
{
public string sourcesPath = "";
public string targetPath = "";
public string filename ="Untitled_13.zip";
public string url = "http://xnwy-adm.91uutu.com/static/Untitled_13.zip";
public void button()
{
sourcesPath = Application.persistentDataPath + "/Zip";
targetPath = Application.persistentDataPath +