Skip to content

Commit c4dd424

Browse files
v1.3.0 - MonoScript, BuildReport support in analyze, Doc improvement, serialized-file command (#46)
* Update version to 1.3 * Add MonoScript handler to Analyze command * Centralize docs in Documentation * Analyze - Support BuildReport files (#45) * New "serialized-file" command with docs and new test data (#47)
1 parent ad5a911 commit c4dd424

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+3322
-469
lines changed

AGENTS.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,23 @@ dotnet test --filter "FullyQualifiedName~SerializedFile"
4747

4848
Test projects: UnityFileSystem.Tests, Analyzer.Tests, UnityDataTool.Tests, TestCommon (helper library)
4949

50+
### Code Style
51+
52+
#### Comments
53+
54+
* Write comments that explain "why". A few high level comments explaining the purpose of classes or methods is very helpful. Comments explaining tricky code are also helpful.
55+
* Avoid comments that are redundant with the code. Do not comment before each line of code explaining what it does unless there is something that is not obvious going on.
56+
* Do not use formal C# XML format when commenting methods, unless it is in an important interface class like UnityFileSystem.
57+
58+
#### Formatting
59+
60+
To repair white space or style issues, run:
61+
62+
```
63+
dotnet format whitespace . --folder
64+
dotnet format style
65+
```
66+
5067
### Running the Tool
5168
```bash
5269
# Show all commands
@@ -61,6 +78,10 @@ UnityDataTool dump /path/to/file.bundle -o /output/path
6178
# Extract archive contents
6279
UnityDataTool archive extract file.bundle -o contents/
6380

81+
# Quick inspect SerializedFile metadata
82+
UnityDataTool serialized-file objectlist level0
83+
UnityDataTool sf externalrefs sharedassets0.assets --format json
84+
6485
# Find reference chains to an object
6586
UnityDataTool find-refs database.db -n "ObjectName" -t "Texture2D"
6687
```
@@ -122,12 +143,15 @@ UnityDataTool (CLI executable)
122143

123144
**Entry Points**:
124145
- `UnityDataTool/Program.cs` - CLI using System.CommandLine
125-
- `UnityDataTool/Commands/` - Command handlers (Analyze.cs, Dump.cs, Archive.cs, FindReferences.cs)
146+
- `UnityDataTool/SerializedFileCommands.cs` - SerializedFile inspection handlers
147+
- `UnityDataTool/Archive.cs` - Archive manipulation handlers
148+
- `Documentation/` - Command documentation (command-analyze.md, command-dump.md, command-archive.md, command-serialized-file.md, command-find-refs.md)
126149

127150
**Core Libraries**:
128151
- `UnityFileSystem/UnityFileSystem.cs` - Init(), MountArchive(), OpenSerializedFile()
129152
- `UnityFileSystem/DllWrapper.cs` - P/Invoke bindings to native library
130153
- `UnityFileSystem/SerializedFile.cs` - Represents binary data files
154+
- `UnityFileSystem/TypeIdRegistry.cs` - Built-in TypeId to type name mappings
131155
- `UnityFileSystem/RandomAccessReader.cs` - TypeTree property navigation
132156

133157
**Analyzer**:
@@ -207,7 +231,7 @@ The SQLite output uses views extensively to join base `objects` table with type-
207231
- `asset_view` - Explicitly assigned assets only
208232
- `shader_keyword_ratios` - Keyword variant analysis
209233

210-
See `Analyzer/README.md` and `Documentation/addressables-build-reports.md` for complete database schema documentation.
234+
See `Documentation/analyzer.md` and `Documentation/addressables-build-reports.md` for complete database schema documentation.
211235

212236
### Common Issues
213237

Analyzer/Properties/Resources.Designer.cs

Lines changed: 169 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Analyzer/Properties/Resources.resx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@
127127
<data name="AudioClip" type="System.Resources.ResXFileRef, System.Windows.Forms">
128128
<value>..\Resources\AudioClip.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
129129
</data>
130+
<data name="BuildReport" type="System.Resources.ResXFileRef, System.Windows.Forms">
131+
<value>..\Resources\BuildReport.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
132+
</data>
130133
<data name="Finalize" type="System.Resources.ResXFileRef, System.Windows.Forms">
131134
<value>..\Resources\Finalize.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
132135
</data>
@@ -223,4 +226,10 @@
223226
<data name="AddrBuildSchemaDataPairs" type="System.Resources.ResXFileRef, System.Windows.Forms">
224227
<value>..\Resources\AddrBuildSchemaDataPairs.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
225228
</data>
229+
<data name="MonoScript" type="System.Resources.ResXFileRef, System.Windows.Forms">
230+
<value>..\Resources\MonoScript.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
231+
</data>
232+
<data name="PackedAssets" type="System.Resources.ResXFileRef, System.Windows.Forms">
233+
<value>..\Resources\PackedAssets.sql;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
234+
</data>
226235
</root>

0 commit comments

Comments
 (0)