Hello,
I’m having some trouble downloading an asset bundle from a web server. I can go to the website in my browser and download the file with no issues there and the asset bundle can be loaded from disk with no issues but when attempting to download the bundle from within the game, it returns a 404 error. I’ve verified that the URL is correct. The code I used is essentially the same as the code below with variable names changed. Any help is appreciated.
private IEnumerator GetBundleFromServer(string bundleName)
{
using (UnityWebRequest request = UnityWebRequestAssetBundle.GetAssetBundle(serverURL + bundleName)
{
yield return request.SendWebRequest();
if (request.isNetworkError || request.isHttpError)
{
Debug.Log(request.error);
}
else
{
asset = DownloadHandlerAssetBundle.GetContent(request);
}
}
}