Example #1
0
        public static void AppendType(StringBuilder sb, EAssetBundleFileInfo abFileInfo, E_AssetType assetType, bool isEdundance, string des)
        {
            List <EAssetFileInfo> assetFiles = new List <EAssetFileInfo>();

            abFileInfo.FindAssetFiles(assetFiles, assetType);
            if (assetFiles.Count == 0)
            {
                return;
            }

            float allSize = 0;
            int   length  = assetFiles.Count;

            for (int i = 0; i < length; i++)
            {
                bool result = assetFiles[i]._includedBundles.Count > 1;
                if (result == isEdundance)
                {
                    allSize += assetFiles[i].GetMemorySize();
                }
            }

            sb.Append(",," + des + "(" + allSize + ")");
            for (int i = 0; i < length; i++)
            {
                bool result = assetFiles[i]._includedBundles.Count > 1;
                if (result == isEdundance)
                {
                    string tmpSize = (assetFiles[i].GetMemorySize()).ToString("f2");
                    sb.Append("," + assetFiles[i]._assetName + "(" + tmpSize + "Kb)");
                }
            }
            sb.AppendLine();
        }
Example #2
0
        public static void AppendType0(StringBuilder sb, EAssetBundleFileInfo abFileInfo, E_AssetType assetType, bool isEdundance, string des)
        {
            List <EAssetFileInfo> assetFiles = new List <EAssetFileInfo>();

            abFileInfo.FindAssetFiles(assetFiles, assetType);
            if (assetFiles.Count == 0)
            {
                return;
            }

            sb.Append(",," + des);
            int length = assetFiles.Count;

            for (int i = 0; i < length; i++)
            {
                bool result = assetFiles[i]._includedBundles.Count > 1;
                if (result == isEdundance)
                {
                    sb.Append("," + assetFiles[i]._assetName);
                }
            }
            sb.AppendLine();
        }