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 ?

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 "file:///")
public static string AssetbundleBaseURL
        if (Application.platform == RuntimePlatform.WindowsWebPlayer || Application.platform == RuntimePlatform.OSXWebPlayer)
            return Application.dataPath + "/assetbundles/";
        else if (Application.platform == RuntimePlatform.Android)
            return "file:///mnt/sdcard/assetbundles/";
            return "file://" + Application.dataPath + "/../assetbundles/";

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

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!

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

Feel Sad Badly.

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!