Skip to content

Commit

Permalink
chore: added temporary logs for remote machine (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
dalkia authored Mar 20, 2024
1 parent 9923115 commit 11e39c0
Showing 1 changed file with 28 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, List<string>>();

foreach (string name in assetBundleNames)
{
// Initialize the list for this bundle
bundleAssets[name] = new List<string>();

// 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)
Expand All @@ -80,9 +107,8 @@ public async void ConvertLODs()

private async Task<string[]> 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();
}

Expand Down

0 comments on commit 11e39c0

Please sign in to comment.