TippingGame/F8Framework

打包多个资源为同一个AB包时,AssetBundleMap中每个资源都包含当前AB下所有资源的AssetPath,这其实是重复的

Closed this issue · 3 comments

如果同一个包内的资源过多(比如SpriteAtla打包的散图),会造成AssetBundleMap额外大,是否考虑将AB包内资源引用单独出来,类似AB包的manifest

[1.0.10] 版本改了这个问题。
1.AssetBundleMap.json中只保留一个AssetPath,改为从AssetBundle中GetAllAssetNames方法获取
2.由于GetAllAssetNames只能获取小写的AssetPath,需修改GetLoadProgress和GetAssetObject方法

如果处于编辑器模式加载资源,可以考虑加入以下判断,解决必须重新打包AB才能正常加载编辑器的资源:

  1. GetAssetInfoFromAssetBundle(string assetName, bool remote = false, bool showTip = false) 直接返回 new AssetInfo(AssetTypeEnum.ASSET_BUNDLE, null, null ,null)
  2. IsLegal(ref AssetInfo assetInfo) 在 AssetTypeEnum.NONE 后直接返回 true

感谢反馈
为了解决找不到AssetPath的问题
[1.0.11]
1.编辑器模式下加载资源改为自动搜索AssetPath
2.IsLegal(ref AssetInfo assetInfo)编辑器模式下返回true