| | |
| | | initialized = true; |
| | | } |
| | | |
| | | private async UniTask Co_LoadMainfestFile(string _category) |
| | | private UniTask Co_LoadMainfestFile(string _category) |
| | | { |
| | | var path = AssetVersionUtility.GetAssetFilePath(StringUtility.Concat(AssetVersionUtility.EncodeFileName(_category), "_assetbundle"), false); |
| | | var _assetBundle = AssetBundle.LoadFromFile(path); |
| | |
| | | if (_assetBundle == null) |
| | | { |
| | | Debug.LogErrorFormat("AssetBundleManifest的包文件为空或者加载出错. Path:{0}", path); |
| | | return; |
| | | return UniTask.CompletedTask; |
| | | } |
| | | |
| | | AssetBundleManifest _assetBundleManifest = _assetBundle.LoadAsset<AssetBundleManifest>(ResourcesPath.AssetDependentFileAssetName); |
| | | if (_assetBundleManifest == null) |
| | | { |
| | | Debug.LogErrorFormat("AssetBundleManifest的包文件为空或者加载出错. Path:{0}", path); |
| | | return; |
| | | return UniTask.CompletedTask; |
| | | } |
| | | |
| | | string[] _assetBundleNames = _assetBundleManifest.GetAllAssetBundles(); |
| | |
| | | |
| | | _assetBundle.Unload(true); |
| | | _assetBundle = null; |
| | | return UniTask.CompletedTask; |
| | | } |
| | | |
| | | public AssetBundleInfo GetAssetBundleInfo(string assetBundleName) |