diff --git a/AssetStudio/AssetsManager.cs b/AssetStudio/AssetsManager.cs
index 46c789e..1f68ef7 100644
--- a/AssetStudio/AssetsManager.cs
+++ b/AssetStudio/AssetsManager.cs
@@ -374,6 +374,7 @@ private void LoadZipFile(FileReader reader)
}
splitStream.Seek(0, SeekOrigin.Begin);
FileReader entryReader = new FileReader(basePath, splitStream);
+ entryReader = entryReader.PreProcessing(Game);
LoadFile(entryReader);
}
catch (Exception e)
diff --git a/AssetStudio/Classes/Object.cs b/AssetStudio/Classes/Object.cs
index 8926390..d857963 100644
--- a/AssetStudio/Classes/Object.cs
+++ b/AssetStudio/Classes/Object.cs
@@ -37,7 +37,7 @@ public Object(ObjectReader reader)
serializedType = reader.serializedType;
byteSize = reader.byteSize;
- Logger.Verbose($"Attempting to read object {type} with {m_PathID} in file {assetsFile.fileName}, starting from offset 0x{reader.byteStart:X8} with expected size of 0x{byteSize:X8} !!");
+ Logger.Verbose($"Attempting to read object {type} with {m_PathID} in file {assetsFile.fileName}, starting from offset 0x{reader.byteStart:X8} with size of 0x{byteSize:X8} !!");
if (platform == BuildTarget.NoTarget)
{
diff --git a/AssetStudioCLI/App.config b/AssetStudioCLI/App.config
index c178c08..56e6c91 100644
--- a/AssetStudioCLI/App.config
+++ b/AssetStudioCLI/App.config
@@ -22,6 +22,8 @@
+
+
\ No newline at end of file
diff --git a/AssetStudioCLI/Components/CommandLine.cs b/AssetStudioCLI/Components/CommandLine.cs
index ec05cba..f47a584 100644
--- a/AssetStudioCLI/Components/CommandLine.cs
+++ b/AssetStudioCLI/Components/CommandLine.cs
@@ -22,6 +22,7 @@ public static RootCommand RegisterOptions()
var rootCommand = new RootCommand()
{
optionsBinder.Silent,
+ optionsBinder.Verbose,
optionsBinder.TypeFilter,
optionsBinder.NameFilter,
optionsBinder.ContainerFilter,
@@ -47,6 +48,7 @@ public static RootCommand RegisterOptions()
public class Options
{
public bool Silent { get; set; }
+ public bool Verbose { get; set; }
public ClassIDType[] TypeFilter { get; set; }
public Regex[] NameFilter { get; set; }
public Regex[] ContainerFilter { get; set; }
@@ -67,6 +69,7 @@ public class Options
public class OptionsBinder : BinderBase
{
public readonly Option Silent;
+ public readonly Option Verbose;
public readonly Option TypeFilter;
public readonly Option NameFilter;
public readonly Option ContainerFilter;
@@ -87,6 +90,7 @@ public class OptionsBinder : BinderBase
public OptionsBinder()
{
Silent = new Option("--silent", "Hide log messages.");
+ Verbose = new Option("--verbose", "Hide log messages.");
TypeFilter = new Option("--types", "Specify unity class type(s)") { AllowMultipleArgumentsPerToken = true, ArgumentHelpName = "Texture2D|Sprite|etc.." };
NameFilter = new Option("--names", result => result.Tokens.Select(x => new Regex(x.Value, RegexOptions.IgnoreCase)).ToArray(), false, "Specify name regex filter(s).") { AllowMultipleArgumentsPerToken = true };
ContainerFilter = new Option("--containers", result => result.Tokens.Select(x => new Regex(x.Value, RegexOptions.IgnoreCase)).ToArray(), false, "Specify container regex filter(s).") { AllowMultipleArgumentsPerToken = true };
@@ -175,6 +179,7 @@ protected override Options GetBoundValue(BindingContext bindingContext) =>
new()
{
Silent = bindingContext.ParseResult.GetValueForOption(Silent),
+ Verbose = bindingContext.ParseResult.GetValueForOption(Verbose),
TypeFilter = bindingContext.ParseResult.GetValueForOption(TypeFilter),
NameFilter = bindingContext.ParseResult.GetValueForOption(NameFilter),
ContainerFilter = bindingContext.ParseResult.GetValueForOption(ContainerFilter),
diff --git a/AssetStudioCLI/Program.cs b/AssetStudioCLI/Program.cs
index 917cc47..50850f4 100644
--- a/AssetStudioCLI/Program.cs
+++ b/AssetStudioCLI/Program.cs
@@ -40,10 +40,13 @@ public static void Run(Options o)
}
Studio.Game = game;
+ Logger.LogVerbose = o.Verbose;
Logger.Default = new ConsoleLogger();
+ Logger.FileLogging = Settings.Default.enableFileLogging;
AssetsHelper.Minimal = Settings.Default.minimalAssetMap;
Shader.Parsable = !Settings.Default.disableShader;
Renderer.Parsable = !Settings.Default.disableRenderer;
+ AnimationClip.Parsable = !Settings.Default.disableAnimationClip;
assetsManager.Silent = o.Silent;
assetsManager.Game = game;
ModelOnly = o.Model;
diff --git a/AssetStudioCLI/Settings.cs b/AssetStudioCLI/Settings.cs
index 4a9a71d..a88ae16 100644
--- a/AssetStudioCLI/Settings.cs
+++ b/AssetStudioCLI/Settings.cs
@@ -69,6 +69,8 @@ public class Settings
public bool exportMiHoYoBinData => AppSettings.Get("exportMiHoYoBinData", true);
public bool disableShader => AppSettings.Get("disableShader", false);
public bool disableRenderer => AppSettings.Get("disableRenderer", false);
+ public bool disableAnimationClip => AppSettings.Get("disableAnimationClip", false);
+ public bool enableFileLogging => AppSettings.Get("enableFileLogging", false);
public bool minimalAssetMap => AppSettings.Get("minimalAssetMap", true);
}
diff --git a/AssetStudioCLI/Studio.cs b/AssetStudioCLI/Studio.cs
index d446051..9c738ee 100644
--- a/AssetStudioCLI/Studio.cs
+++ b/AssetStudioCLI/Studio.cs
@@ -324,7 +324,7 @@ public static void ProcessAssetData(Object asset, ClassIDType[] typeFilters, Reg
break;
case Mesh _:
case TextAsset _:
- case AnimationClip _:
+ case AnimationClip _ when AnimationClip.Parsable:
case Font _:
case Sprite _:
case Material _: