IEnumerator DownloadBundle(string ContentName, BundleData CurrentBundle) { Debug.Log("Downloading Bundle " + CurrentBundle._Name); string url = "https://soleilrouge.herokuapp.com/Games/DownloadBundleGet/?platform=" + EngineInstance.GetPlatformName() + "&name=" + CurrentBundle._Url + "&version=" + CurrentBundle._Version; Debug.Log("Url = [" + url + "]"); //Request.redirectLimit = 1; _Request = UnityWebRequest.Get(url); yield return(_Request.SendWebRequest()); //_AssetStatus = new WWW (url); //yield return _AssetStatus; if (_Request.isNetworkError || _Request.isHttpError) { Debug.LogWarning("Erreur: Impossible de télécharger le Bundle"); ShowDownloadErrorPanel(); } else { Directory.CreateDirectory(PathBuilder.GetContentFolder(ContentName)); Debug.Log("Writing Bundle [" + PathBuilder.GetBundleFile(ContentName, CurrentBundle._Name) + "]"); System.IO.File.WriteAllBytes(PathBuilder.GetBundleFile(ContentName, CurrentBundle._Name), _Request.downloadHandler.data); yield return(1); HideDownloadBundle(); CheckLoadBundles(); } }