Hello everyone!!!
I try to download an asset bundle from a web server because I need to save all the AssetBundles on my local PC. First of all, I save all the links of the asset bundles in a firebase, after I consult the firebase try to download the asset bundle with the following code:
IEnumerator DownLoadAssetBundle(cars _car)
{
UnityWebRequest request = UnityWebRequest.Get(_car.ModelURL);
request.downloadHandler = new DownloadHandlerFile(urlFolder);
yield return request.SendWebRequest();
if (request.result != UnityWebRequest.Result.Success)
{
Debug.Log(request.error);
}
else
{
Debug.Log("saved in " + urlFolder);
}
}
but when I try to test it, Unity gave me the following error:
ArgumentException: Failed to create file E:/Unity Projects/Firebase/Builds
UnityEngine.Networking.DownloadHandlerFile.InternalCreateVFS (System.String path, System.Boolean append) (at <22cd8f01dc1543789c8f26f4546673cc>:0)
UnityEngine.Networking.DownloadHandlerFile..ctor (System.String path) (at <22cd8f01dc1543789c8f26f4546673cc>:0)
TestGet+<DownLoadAssetBundle>d__7.MoveNext () (at Assets/Scripts/JsonFirebase/TestGet.cs:56)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <c62cc0ef748e4107b21e2999fa50d73a>:0)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
<GetCoroutine>d__6:MoveNext() (at Assets/Scripts/JsonFirebase/TestGet.cs:47)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
I close my antivirus (sometimes my antivirus gives me some issues), and y put the HTTPS in the link, but don’t solve the error. I don’t know what happens.
I hope someone lets me know where is the error.
thanks and regards
UPDATE
The issue was solved. But I have a new one. When I try to download it from the HTTP didn’t works, i can’t se the copy of the file, but when i try with the HTTPS appear the next issue:
Curl error 60: Cert verify failed: UNITYTLS_X509VERIFY_FLAG_USER_ERROR1
SSL CA certificate error
UnityEngine.Debug:Log (object)
TestGet/<DownLoadAssetBundle>d__7:MoveNext () (at Assets/Scripts/JsonFirebase/TestGet.cs:61)
UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)
some one could help me please