• 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 /
avatar image
3
Question by Yuta · Mar 31, 2011 at 01:45 AM · androidassetbundle

Does AssetBundle on Android work well ?

My development enviroment is Unity Pro 3.3, Android Pro, and Windows Xp.

I try to make my own avatar system with CharacterCustomization Sample. But on Android, I can't load data of assets via AssetBundles.

On Windows, I succeeded to load assets via AssetBundles.Load() with WWW class. But on Android, same program does not work well. I can't load data.

How do I load data of assets on Android ?

Comment
Add comment · Show 1
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 Yuta · Apr 08, 2011 at 01:31 AM 0
Share

Is this setting help me ? I'm trying use the option for select target.

@$$anonymous$$enuItem("Assets/Auto Build Resource Files") static function ExportResource () {

var target = BuildTarget.Android; BuildPipeline.BuildAssetBundle(AssetDatabase.Load$$anonymous$$ainAssetAtPath("Assets/artwork/lerpzuv.tif"), null, "AssetBundles/Shared.unity3d", options, target);

5 Replies

· Add your reply
  • Sort: 
avatar image
4

Answer by Yuta · Apr 14, 2011 at 07:59 AM

I've got the answer.

Points are these.

  1. Use the option "BuildTarget.Android".
  2. Describe the path with triple slash "file:///"

I did it with these processes.

  1. Delete directories "Per Texture Materials", "assetbundles", and so on.
  2. Use the option "BuildTarget.Android" to all "BuildPipeline.BuildAssetBundle".
  3. Run these on Editor. Character Generator/Generate Materials Character Generator/Create Assetbundles Character Generator/Update Character Element Database
  4. Copy Assetbundles database to Android device which like "/mnt/sdcard/assetbundles/"
  5. Modify AssetbundleBaseURL. (the point was "
Comment
Add comment · Show 2 · 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 cregox · Dec 16, 2011 at 04:34 PM 0
Share

Thanks so much for item #1! This is it! http://unity3d.com/support/documentation/ScriptReference/BuildTarget.html

avatar image elixir-bash · Nov 09, 2012 at 06:26 AM 0
Share

Hey guys, did you get a solution for this. Im trying to load asset bundle from sd card. I use www.LoadFromCacheOrdownload(path,version). The file exists , but when i check for bundle it says null. I also created the asset bundle specifically for android. Can you please tel me how i could load an asset bundle from sd card of an android device

avatar image
4

Answer by kablammyman · Aug 25, 2011 at 09:54 PM

AssestBundles need to be made specifically for the target you want to use them on for it to work. It took a lot of swearing and head banging to figure this out. The docs should specify this. Once you make it for the android (or in this case, re-make them) it should work.

BuildPipeline.BuildAssetBundle(Selection.activeObject, selection, path, BuildAssetBundleOptions.CollectDependencies | BuildAssetBundleOptions.CompleteAssets, BuildTarget.Android);

notice the optional param BuildTarget.Android

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 Sdar · Apr 03, 2011 at 06:36 AM

I've Got the same Problem just like U've.

Feel Sad Badly.

Comment
Add comment · Show 1 · 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 cregox · Dec 04, 2012 at 09:37 AM 0
Share

not an answer

avatar image
-1

Answer by replay11 · Dec 04, 2012 at 03:25 AM

Thanks, Victor! You saved the day with that comment! I don't know if I ever would have found that about the BuildTarget.Android if you didn't mention it. I made that one change and then it worked! Awesome!

Comment
Add comment · Show 1 · 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 cregox · Dec 04, 2012 at 09:37 AM 0
Share

not an answser

avatar image
0

Answer by yuanfanglaipeng · Apr 08, 2014 at 04:32 AM

If i do not want to Copy the AssetBundle ,Can i package the assetBundle in an apk !wich floder should i place the assetBundle !If i put the assetBundle in Assets floder the Code can not find the AssetBundle!

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

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

6 People are following this question.

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

Related Questions

Downloading Asset Bundle on Android and Saving to File 1 Answer

I I'm trying to make a Build Android App Bundle with asset bundle but it gives me the following error, i try to integrate asset delyveri 0 Answers

Asset Bundles compatibility for mobile 1 Answer

Create AssetBundles and Build for Android 0 Answers

Android Download asset bundle locally 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