美文网首页
访问安卓文件

访问安卓文件

作者: 叫我颜先生 | 来源:发表于2019-05-21 17:52 被阅读0次

void Start()
{
string url = "file://" + "/storage/emulated/0/1.txt";
LoadByWWW(url);
}

public void LoadByWWW(string path)
{
    StartCoroutine(doLoadByWWW(path));
}

IEnumerator doLoadByWWW(string url)
{
    Debug.Log("doLoadByWWW == url ==================   " + url);
    WWW w = new WWW(url);

    yield return w;

    Debug.LogError(w.error);

    if (w.isDone)
    {
        Debug.LogError("===============done");
        Debug.LogError(w.text);
    }
    else
    {
        Debug.LogError("1");
    }
}

相关文章

网友评论

      本文标题:访问安卓文件

      本文链接:https://www.haomeiwen.com/subject/fexszqtx.html