Skip to content

Commit f369382

Browse files
committed
Merge branch 'main' into add-buildlayout-support
2 parents 2ae27eb + fbb0f72 commit f369382

22 files changed

+635
-26
lines changed

Analyzer/AnalyzerTool.cs

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ public int Analyze(
6060
searchPattern,
6161
noRecursion ? SearchOption.TopDirectoryOnly : SearchOption.AllDirectories);
6262

63+
int countFailures = 0;
64+
int countSuccess = 0;
65+
int countIgnored = 0;
6366
int i = 1;
6467
foreach (var file in files)
6568
{
@@ -74,6 +77,7 @@ public int Analyze(
7477
{
7578
parser.Parse(file);
7679
ReportProgress(Path.GetRelativePath(path, file), i, files.Length);
80+
countSuccess++;
7781
}
7882
catch (Exception e)
7983
{
@@ -83,25 +87,27 @@ public int Analyze(
8387
Console.WriteLine($"{e.GetType()}: {e.Message}");
8488
if (m_Verbose)
8589
Console.WriteLine(e.StackTrace);
90+
countFailures++;
8691
}
8792
++i;
8893
}
8994
}
9095
if (!foundParser)
9196
{
92-
var relativePath = Path.GetRelativePath(path, file);
93-
9497
if (m_Verbose)
9598
{
99+
var relativePath = Path.GetRelativePath(path, file);
96100
Console.WriteLine();
97101
Console.WriteLine($"Ignoring {relativePath}");
98102
}
99103
++i;
104+
countIgnored++;
105+
continue;
100106
}
101107
}
102108

103109
Console.WriteLine();
104-
Console.WriteLine("Finalizing database...");
110+
Console.WriteLine($"Finalizing database. Successfully processed files: {countSuccess}, Failed files: {countFailures}, Ignored files: {countIgnored}");
105111

106112
writer.End();
107113
foreach (var parser in parsers)
@@ -116,6 +122,11 @@ public int Analyze(
116122
return 0;
117123
}
118124

125+
private bool ProcessFile(string file, string path, SQLiteWriter writer, int i, int length)
126+
{
127+
throw new NotImplementedException();
128+
}
129+
119130
int m_LastProgressMessageLength = 0;
120131

121132
void ReportProgress(string relativePath, int fileIndex, int cntFiles)
@@ -138,7 +149,7 @@ void ReportProgress(string relativePath, int fileIndex, int cntFiles)
138149
void EraseProgressLine()
139150
{
140151
if (!m_Verbose)
141-
Console.Write($"\r{new string(' ', m_LastProgressMessageLength)}");
152+
Console.Write($"\r{new string(' ', m_LastProgressMessageLength)}\r");
142153
else
143154
Console.WriteLine();
144155
}
13.1 KB
Loading
56.1 KB
Loading
23.4 KB
Loading
12.7 KB
Loading

Documentation/RemoveHashName.png

53.1 KB
Loading
59.8 KB
Loading
11.8 KB
Loading
26.3 KB
Loading

Documentation/analyze-examples.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,10 @@ object_id type name pretty_size crc32
214214
3866367853307903194 Sprite red 460.0 B 1811343945
215215
```
216216

217+
## Example: Finding differences between two builds
218+
219+
This is a large subject, see [Comparing Builds](comparing-builds.md).
220+
217221
## Example: Matching content back to the source asset
218222

219223
UnityDataTool works on the output of a Unity build, which, by its very nature, only contains the crucial data needed to efficiently load built content in the Player. So it does not include any information about the assets and scenes in the project that was used to create that build. However you may want to match content back to the original source asset or scene. For example if the size of an AssetBundle has unexpectedly changed between builds then you may want to track down which source assets could be responsible for that change. Or you may want to confirm that some particular image has been included in the build.

0 commit comments

Comments
 (0)