1、Resource.load(string path)
优点:同步,使用方便
缺点:只能加载Resource目录下的资源

2、WWW
优点:灵活,可以加载Application.streamingAssetsPath、Application.persistentDataPath目录下的资源,以及从网络上下载资源
缺点:异步,如果业务需要按需加载资源,容易打散逻辑

3、AssetBundle.CreateFromFile(string path)
优点:同步,可以加载Application.persistentDataPath目录下的AssetBundle
缺点:AssetBundle不能压缩,在Android下不能加载Application.streamingAssetsPath下的AssetBundle

4、AssetBundle.CreateFromMemoryImmediate(byte[] binary)
优点:同步,可以加载Application.persistentDataPath目录下压缩过的AssetBundle
缺点:在Android下不能加载Application.streamingAssetsPath下的AssetBundle

相关文章:

  • 2022-01-15
  • 2021-08-21
  • 2021-09-09
  • 2021-06-07
  • 2021-09-25
  • 2021-07-16
  • 2021-08-17
猜你喜欢
  • 2022-12-23
  • 2021-12-14
  • 2021-07-02
  • 2021-06-29
  • 2022-12-23
  • 2021-10-08
  • 2021-09-28
相关资源
相似解决方案