[CLI] Add --load-all flag

- Added --load-all flag to load assets of all types
- Improved option grouping on the help screen
This commit is contained in:
VaDiM
2023-09-10 22:35:30 +03:00
parent a4cdff5934
commit a926644ff6
2 changed files with 202 additions and 139 deletions

View File

@ -33,8 +33,10 @@ namespace AssetStudioCLI
{
var isLoaded = false;
assetsManager.SpecifyUnityVersion = CLIOptions.o_unityVersion.Value;
assetsManager.SetAssetFilter(CLIOptions.o_exportAssetTypes.Value);
if (!CLIOptions.f_loadAllAssets.Value)
{
assetsManager.SetAssetFilter(CLIOptions.o_exportAssetTypes.Value);
}
assetsManager.LoadFilesAndFolders(CLIOptions.inputPath);
if (assetsManager.assetsFileList.Count == 0)
{
@ -134,7 +136,7 @@ namespace AssetStudioCLI
}
isExportable = CLIOptions.o_exportAssetTypes.Value.Contains(asset.type);
if (isExportable)
if (isExportable || (CLIOptions.f_loadAllAssets.Value && CLIOptions.o_exportAssetTypes.Value == CLIOptions.o_exportAssetTypes.DefaultValue))
{
fileAssetsList.Add(assetItem);
}