如何读取StreamingAssets文件夹内容
问题描述
使用UnityWebRequest.Get(url)方式读取StreamingAsset文件夹内容。
var url = Application.streamingAssetsPath + version.file;
var savePath = Application.persistentDataPath +(version.file);
var webRequest = UnityWebRequest.Get(url);
webRequest.downloadHandler =newDownloadHandlerFile(savePath);
yieldreturn webRequest.SendWebRequest();