我看到官方文档中说明:
Note that bundles are not fully compatible between platforms. A bundle built for any of the standalone platforms (including webplayer) can be loaded on any of those platforms but not on iOS or Android. Furthermore, a bundle built for iOS is not compatible with Android and vice versa.

但是我们看到,用以下步骤进行在Android机子上使用AssetBundle

重点有2点:

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

以下是步骤:

  1. Delete directories "Per Texture Materials", "assetbundles", and so on. 把已经导出过的包删掉
  2. Use the option "BuildTarget.Android" to all "BuildPipeline.BuildAssetBundle". 要把BuildTarget为Android平台!!!
  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/" 把这些包放到Android的指定目录下
  5. Modify AssetbundleBaseURL. (the point was "file:///") 修改获取AssetbundleBaseURL基础路径的地址
public static string AssetbundleBaseURL{    get    {        if (Application.platform == RuntimePlatform.WindowsWebPlayer || Application.platform == RuntimePlatform.OSXWebPlayer)        {            return Application.dataPath + "/assetbundles/";        }        else if (Application.platform == RuntimePlatform.Android)        {            return "file:///mnt/sdcard/assetbundles/";        }        else        {            return "file://" + Application.dataPath + "/../assetbundles/";        }    }}


更多相关文章

  1. osg for android 学习之三:老外的步骤,包括编译和运行例子
  2. Unable to find suitable jdk installaion
  3. 六步骤开发和发布自己的Android(安卓)Studio类库
  4. MSDK接入 中的各种问题
  5. Android(安卓)PhotoView 使用教程
  6. Android中事件处理之LongClickListener实现步骤
  7. Unity导出Android工程生成apk安装包流程
  8. android 上 webkit js 扩展之全局本地对象实现步骤
  9. Hello Android(安卓)- proguard混淆器使用(签名时报错)

随机推荐

  1. android 复制 粘贴 功能实现
  2. Mac-appium之android sdk配置
  3. Android SDKManger 更新设置
  4. Eclipse for Android安装与配置
  5. android 权限列表
  6. Android Activity生命周期理解
  7. Android导入带有第三方jar包的项目报错
  8. Android及JavaSE游戏引擎LGame-0.2.9发布
  9. Android实现地理定位功能
  10. [Android]TextUtils.ellipsize()截取指定