- Home /
Failed downloading assetbundle from web
I have an Unity game that is build for web player. It has main file (.unity3d) and an asset bundle file (named bundle.unity3d). When I put asset bundle file on my web server, and run the game locally, the asset bundle will fail to load (error message: Failed downloading bundle.unity3d). I have crossdomain.xml on my web site, but it doesn't work. Also if I put my game on another web site it still won't load the asset bundle (so I know that the reason is not my local tests).
Any ideas?
Answer by Graham-Dunnett · May 30, 2013 at 12:37 PM
Grab a copy of curl
and try to download the bundle.unity3d
file with that. Curl
lets you do http downloads from the command line, so is useful for debugging problems like this. If curl can download the asset bundle, and gets a file that is binary identical to the one you have on the server, then the problem you have is related to Unity. If you determine that the problem is Unity-related, then post back some of the code you use to create the asset bundle, the code you use to load it, and maybe a link to the server where the file is hosted. If the asset bundle and webplayer .unity3d
files are on the same server then you shouldn't need a crossdomain.xml
.
Hi, Yes I can get the file from the url (using curl or any other tool) and they are identical. The code I use to download the bundle file is copy pasted from Unity docs (http://docs.unity3d.com/Documentation/$$anonymous$$anual/DownloadingAssetBundles.html)
And no, main file and the bundle are not on the same domain, that is the requirement at the moment (don't ask :D).
Your answer
![](https://koobas.hobune.stream/wayback/20220613103211im_/https://answers.unity.com/themes/thub/images/avi.jpg)