博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
AssetBundle 在Android机子上进行读取 .
阅读量:7010 次
发布时间:2019-06-28

本文共 1465 字,大约阅读时间需要 4 分钟。

我看到官方文档中说明:

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/";        }    }}

转载地址:http://jrvtl.baihongyu.com/

你可能感兴趣的文章
GUI进化--数据与界面分离
查看>>
三级菜单实例
查看>>
Teleport Pro使用教程
查看>>
C# 如何生成CHM帮助文件
查看>>
Java编程的逻辑 (93) - 函数式数据处理 (下)
查看>>
一对多多对多的建表原则
查看>>
Maven详解(四)------ 常用的Maven命令
查看>>
可视化之Berkeley Earth
查看>>
线性表的顺序存储结构之顺序表类的实现_Java
查看>>
Hadoop的namenode的管理机制,工作机制和datanode的工作原理
查看>>
AX88772B 驱动移植
查看>>
array
查看>>
背水一战 Windows 10 (60) - 控件(媒体类): Pointer 涂鸦板, InkCanvas 涂鸦板
查看>>
[转]Repeat Page Header on each Page for reports SSRS
查看>>
一次误报引发的DNS检测方案的思考:DNS隧道检测平民解决方案
查看>>
Python操作SQLAlchemy之连表操作
查看>>
什么是架构师?
查看>>
layer.alert自定义关闭回调事件
查看>>
LESS IS MORE
查看>>
用最短的payload绕过WAF(入门)
查看>>