private static void InitAsset(WaitingAssetsInfo waitInfo) { var path = waitInfo.path; var extension = Path.GetExtension(path).ToLower(); if (ABConfig.IsExcludeExtention(extension)) { return; } ABAssetsInfo info = null; if (!s_AssetInfoDic.ContainsKey(path)) { var assetType = ABConfig.GetAssetType(extension); var width = 0; var height = 0; if (assetType == AssetsType.Texture) { ABHelper.GetTextureWidthAndHeight(path, out width, out height); } info = new ABAssetsInfo() { type = assetType, name = Path.GetFileNameWithoutExtension(path), extension = extension, path = path, abName = ABHelper.GetABName(path), textureWidth = width, textureHeight = height }; s_AssetInfoDic[path] = info; } else { info = s_AssetInfoDic[path]; } info.size = ABHelper.GetAssetSize(path); if (info.type == AssetsType.Texture) { var maxSize = 0; ABHelper.GetTextureMaxSize(s_TargetPlatform, info.path, out maxSize); info.textureMaxSize = maxSize; } foreach (var ab in waitInfo.parents) { info.AddRefAB(ab); } if (!s_AssetTypeStat.ContainsKey(AssetsType.None)) { s_AssetTypeStat[AssetsType.None] = new StatInfo(); } if (!s_AssetTypeStat.ContainsKey(info.type)) { s_AssetTypeStat[info.type] = new StatInfo(); } s_AssetTypeStat[AssetsType.None].Stat(1, info.size); s_AssetTypeStat[info.type].Stat(1, info.size); s_CurrentAssetsList.Add(info); s_AssetDirty = true; }