im trying to get the file on StreamingAssets folder i created on Assets using UnityWebRequest but it is not work when i start build and run my project on android in unity
IEnumerator CheckDB() // updating database
{
if(!File.Exists(dataFilePath))
{
#if UNITY_ANDROID
// getting the source file, for android
string path = "jar:file://" + Application.dataPath + "!/assets/game.dat";
// object downloader
UnityWebRequest downloader = UnityWebRequest.Get(path);
while (!downloader.isDone)
{
// nothing to be done while downloader gets our db file
}
// then save to application.persistentdatapath
yield return downloader.SendWebRequest();
RefreshData();
#endif
}
}
Aucun commentaire:
Enregistrer un commentaire