zoukankan      html  css  js  c++  java
  • 加载Assetbundle需要注意的地方

    WWW:异步实现,手机上不能用于同步代码,需要监测其完成状态。不用www.dispose。

    CreateFromFile:阻塞,但是移动平台上面的路径格式有点坑,没时间看,不用。

    以下两个方式需要先使用文件流读取到字节数组:

    CreateFromMemery:异步,注意返回值不是Assetbundle

    CreateFromMermeryImmediate:阻塞,返回值为Assetbundle

    沙盒路径:

    注意,使用WWW有所区别:

    PC:"file:///" + Application.persistentDataPath;

    安卓:"file://" +Application.persistentDataPath;

    使用IO文件流,直接使用Application.persistentDataPath;

    其它路径用不上,要做就做动态,绝不在包里存留冗余资源

  • 相关阅读:
    网络编程TCP
    collections模块
    异常处理
    hashlib模块
    configparse模块
    logging模块
    序列化模块
    os模块
    时间模块
    random模块
  • 原文地址:https://www.cnblogs.com/verlout/p/5445992.html
Copyright © 2011-2022 走看看