AssetBundle.LoadFromStreamAsync比LoadFromFile有明显缺点么?
AssetBundle.LoadFromStreamAsync比LoadFromFile有明显缺点么?
https://answer.uwa4d.com/question/5b98851aa711f261c1677e75
问下用过的人这接口怎么样,看文档是它自己处理压缩
The function supports bundles of any compression type. lzma compressed data is decompressed to memory, while uncompressed and chunk-compressed bundles are read directly from the Stream.
直观猜测应该跟loadfromfile一样,它内部也应该是通过filepath获得native stream,这个接口是managed stream。
感觉可以用来实现健全的bundle加密
比较直观的缺点就是内存。
AssetBundle.LoadFromStreamAsync会帮你把ab中的资源一次性load进内存
LoadFromFile会在ab.load具体资源的时候,才加载对应的资源