Application.persistentDataPath ~~~~~~~~~~~~~~~~~~~~~~~~~C:\Users\StevenZhou\AppData\LocalLow\DefaultCompany\项目名称
Application.dataPath ~~~~~~~~~~~~~~~~~项目所在目录
Application.streamingAssetsPath ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~项目目录\StreamingAssets
/**************************WWW加载本地文件***********************************/
StartCoroutine(DownloadZipFile());<pre name="code" class="csharp">IEnumerator DownloadZipFile()
{
Debug.Log("starting download");
myFile = "testZip.zip";
www = new WWW("file://E:/Unitydemo/testZip.7z");
yield return www;
if (www.error != null) Debug.Log(www.error);
}
<pre class="codeExampleCS" style="margin-top: 0px; margin-bottom: 30px; padding: 20px; font-size: 0.9375em; font-family: Consolas, Monaco, 'Andale Mono', monospace; border: 1px solid rgb(221, 221, 221); color: rgb(69, 84, 99); overflow: auto; line-height: 21.6000003814697px; background: rgb(255, 255, 255);">public string url = "http://images.earthcam.com/ec_metros/ourcams/fridays.jpg";
IEnumerator Start() {
<a target=_blank href="http://docs.unity3d.com/ScriptReference/WWW.html" style="color: rgb(184, 60, 130); outline: none; cursor: pointer;">WWW</a> www = new <a target=_blank href="http://docs.unity3d.com/ScriptReference/WWW.html" style="color: rgb(184, 60, 130); outline: none; cursor: pointer;">WWW</a>(url);
yield return www;
}