diff --git a/asset-bundle-converter/Assets/AssetBundleConverter/LODsConverter/Scripts/LODConversion.cs b/asset-bundle-converter/Assets/AssetBundleConverter/LODsConverter/Scripts/LODConversion.cs index 7c1ef861..f490e3ac 100644 --- a/asset-bundle-converter/Assets/AssetBundleConverter/LODsConverter/Scripts/LODConversion.cs +++ b/asset-bundle-converter/Assets/AssetBundleConverter/LODsConverter/Scripts/LODConversion.cs @@ -61,6 +61,33 @@ public async void ConvertLODs() AssetDatabase.SaveAssets(); AssetDatabase.Refresh(); assetDatabase.AssignAssetBundle(Shader.Find("DCL/Scene"), false); + + string[] assetBundleNames = AssetDatabase.GetAllAssetBundleNames(); + // Dictionary to hold asset bundle names and their assets + var bundleAssets = new Dictionary>(); + + foreach (string name in assetBundleNames) + { + // Initialize the list for this bundle + bundleAssets[name] = new List(); + + // Get the asset paths for each asset in the bundle + string[] assetPaths = AssetDatabase.GetAssetPathsFromAssetBundle(name); + + foreach (string path in assetPaths) + { + Debug.Log($"JUANI ASSET {name} has path {path}"); + bundleAssets[name].Add(path); + } + } + + // Get all file names in all directories and subdirectories. + string[] files = Directory.GetFiles(lodPathHandler.tempPath, "*.*", SearchOption.AllDirectories); + + // Print the name of each file. + foreach (string file in files) + Debug.Log($"JUANI File {file} is is temp path"); + BuildAssetBundles(EditorUserBuildSettings.activeBuildTarget, dictionaryStringForMetadata); } catch (Exception e) @@ -80,9 +107,8 @@ public async void ConvertLODs() private async Task DownloadFiles() { - Debug.Log("Starting file download"); var urlFileDownloader = new URLFileDownloader(urlsToConvert, lodPathHandler.tempPath); - Debug.Log("Finished file download"); + Debug.Log("ALL files downloaded succesfully!"); return await urlFileDownloader.Download(); }