WWW.assetBundle is null (Unity3d 5.3.4f1)


I’m having trouble extracting a scene from an AssetBundle file with the WWW object. Before anyone asks, yes, I did look at http://answers.unity3d.com/questions/820023/wwwassetbundle-is-null-unity3d-455.html , but it wasn’t any help. The Asset Bundle is located at Dropbox - AssetBoundleTest - Simplify your life . And, I also know that I misspelled bundle in the folder name.

The Asset Bundle that I’m referring to is “gamescene” file. From within the coroutine I’ve tried both:

using (WWW www = WWW.LoadFromCacheOrDownload(@"https://www.dropbox.com/sh/rgxg06onv1vkt6d/AAAhNecppsitHt6nrDYUwJbga/gamescene", _levelVersion))


using (WWW www = new WWW(@"https://www.dropbox.com/sh/rgxg06onv1vkt6d/AAAhNecppsitHt6nrDYUwJbga/gamescene"))

In both cases, the WWW object some takes the time to download something, and both the progress property and the isDone property mark that it finished downloading. There are no errors in the error property. Yet, the assetBundle property is always null.

I checked the number of bytes (when done without the Caching class) that were downloaded, and I found that size-wise, it only downloads about 10% of the file before it marks that it is done downloading. The reason I said about 10% is not due to rounding, but because the amount downloaded changes from run to run. I’ve checked the file in question by using the AssetBundle.LoadFromFile(…) method, and loading that scene from the file worked out just fine when I used the AssetBundle class to load it from my hard-drive. Yet, loading it from my hard-drive isn’t going to be an option in the final product.

I appreciate any help you guys can give me.



Even I am facing the same issue ,www.assetBundle is null but i get call back saying the download is complete.
But in my case , the link “https://www.dropbox.com/z/xxxxxx/yyyyy?dl=0” had dl=0 , making dl=1 made it possible to download.

The link need to be downloadable asset link.

This solved my problem,Thanks

So, @yathishgk’s answer was really close to the correct solution to my problem.

It turns out that there were two problems with my URL.

1- @yathishgk pointed out the first problem. I needed to set “dl=1” in my URL’s options.

2- The second issue was with my Dropbox share link. I was using a share link that was for the folder containing the Asset Bundle that I wanted to download, and then I added a slash followed by the file name. There might be a proper way to reference a file that is in a folder that is share linked, but adding “/[filename]” the link’s URL isn’t the way to go.

What did work was sharing the actual file that I want to download into my game. I then copied the URL for that Share Link into my game and applied the fix for issue 1. I set the “dl” option to “1” instead of “0” inside of the URL.

It took forever to download those 3 megabytes, but they downloaded, and the level loaded just fine. I would also like to thank @yathishgk for their help in this.