Unity 读取 相关

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;

}
 
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值