访问安卓文件

it2025-10-02  4

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"); } }
最新回复(0)