- Home /
WWW.LoadFromCacheOrDownload Unity fatal error
[EDIT :] See the last comment !
Hello,
I have already ask this question, but I think I explained wrong. I go try again.
I have a script for build an assetbundle. I can call this script for build on windows standalone, iphone or android, through BuildTarget.StandaloneWindows / BuildTarget.iPhone / BuildTarget.Android.
In another topic, I speak of an another problem, and because I not find a solution, I've update my Unity version (4.0 to 4.5). But as I does this, I have to rebuild my assetbundle.
When I built an assetbundle, I get a ".unity3d", and I send it to my server. If I build for windows standalone, I add "_win" to the file name, "_ios" for iphone, and "_and" for android. It allows me to load the correct assetbundle, in function of platform. This method work correctly on my 4.0 version. I built and load with no problem.
Now, my problem. So, I am on Unity 4.5.x. Without surprise, if I launch my program, this one, gives me, for any assetbundle, one error that say "no good version blablabla ...". Therefore, naturally, I know that I have to rebuild all my assetbundle. I rebuild one asset for standalone, I test, It works. I rebuild one asset for iphone (in fact ipad, but not important), I test, and I have this error on www.error : "403 Forbidden" !!!
Why I have this error, whereas, on windows I did not ? It's the same script !
I does a lot of test, and some research, without success. I know error 403 mean that server found my assetbundle, but it refuse my access, but I don't know why ...
I realy need help ... I feel that it is not much, but I block ...
I hope you understand my problem (I know that my english is not good ...)
In advance, thanks to you, Kind regards.
Are you sure the file on your webhosting is accessible? you may need to include an .htaccess : http://en.wikipedia.org/wiki/.htaccess to your webserver.
check this page out to create your htaccess file : http://www.sitepoint.com/htaccess-for-all/
Thanks for you reply, and thanks for links !
I think that yes, because when I built with the windows method, I load with no problem. I have the 403 error when I try to load an assetbundle built for iOS.
I just saw, that ios file, have a different access permission in my webhosting ... In fact, all my assetbundles built on 4.5.x in ios mode, have a different permission, compared to windows mode. So I changed to the correct permissions, but this not solved my problem, and now, ins$$anonymous$$d of 403 error, I have a crash !
"Fatal error! The file '(private)/AppData/LocalLow/Unity/WebPlayer/Cache/(private)/(complicated name file, with a lot of character and digit)/CAB-(with the complicated name file, again)' is corrupted! Remove it and launch unity again! [Position out of bounds! (number) > (another lower number)]"
If I remove the corrupted file, when it is regenerated, when I relaunch the project, it crash again. If I not load the iOS assetbundle, but I load the windows, the fatal error disappear.
So, I don't know if the correction on iOS assetbundle acces solved my 'error 403', and now I have a crash ...
Any idea why ?
$$anonymous$$ind regards.
This new crash (with message box fatal error) is link to WWW.LoadFromCacheOrDownload. It would mean that my ios assetbundle, is corrupted ? What can I do to settle it, and why it works with the windows assetbundle ?
Answer by Bunny83 · Nov 06, 2014 at 09:00 AM
403 Forbidden is a server response from the server you try to contact. That has nothing to do with Unity. You either issued the wrong request, or something else on your server is messed up. Again, this is a response from your server. There are endless possible reason for such an error. Maybe your filename contains illegal characters.
With the information provided we can't help you any further.
ps: Don't post multiple questions on the same issue. If you want to provide new information edit your question.
Your answer
Follow this Question
Related Questions
Asset Bundle Download Problem 0 Answers
Not download/load from cache for second time 0 Answers
How to import the object from server to unity 2 Answers
Access raw AssetBundle data using UnityWebRequest? 4 Answers
Save a prefab from asset bundle 1 Answer