Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by fct 509 · Apr 04, 2016 at 07:14 AM · assetbundleassetbundleswww classdownloadable contentwww.error

WWW.assetBundle is null (Unity3d 5.3.4f1)

Hi,

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 https://www.dropbox.com/sh/rgxg06onv1vkt6d/AAAhNecppsitHt6nrDYUwJbga . 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))

and

 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.

Thanks,

Francisco

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by fct 509 · Apr 05, 2016 at 06:42 AM

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by yathishgk · Apr 05, 2016 at 04:57 AM

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

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image fct 509 · Apr 05, 2016 at 05:45 AM 0
Share

I also had a "?dl=0" at the end of my link, but when I noticed that it wasn't making any difference, I took it out. I'll have to give your solution a try. Thanks.

avatar image fct 509 fct 509 · Apr 05, 2016 at 06:19 AM 0
Share

So, I can't accept your answer because it wasn't quite right.

That being said, I rewarded you with a point because you were really close, and your answer did lead me to the correct answer.

avatar image yathishgk fct 509 · Apr 05, 2016 at 09:06 AM 0
Share

Thats great.....thanks

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

56 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How do I insert Asset Bundler 0 Answers

keep fixed asset bundle hash values 0 Answers

AssetBundle Manager Doesn't fetch assetBundle on Andriod 0 Answers

Unity 2018.4 - Trying to reload asset from disk that is not stored on disk 1 Answer

AssetBundle (DLC) data load to Android phone at runtime 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges