Skip to content

Commit 76c9489

Browse files
Some manual edits
Remove duplicated reference section in main readme that would be hard to maintain A few edits based on review.
1 parent df89176 commit 76c9489

File tree

4 files changed

+20
-120
lines changed

4 files changed

+20
-120
lines changed

UnityDataTool/Commands/analyze.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Analyze all files in a directory:
2424
UnityDataTool analyze /path/to/asset/bundles
2525
```
2626

27-
Analyze only `.bundle` files and save to a custom database:
27+
Analyze only `.bundle` files and specify a custom database name:
2828
```bash
2929
UnityDataTool analyze /path/to/asset/bundles -o my_database.db -p "*.bundle"
3030
```
@@ -34,6 +34,8 @@ Fast analysis (skip reference tracking):
3434
UnityDataTool analyze /path/to/bundles -s
3535
```
3636

37+
See also [Analyze Examples](../../Documentation/analyze-examples.md).
38+
3739
---
3840

3941
## What Can Be Analyzed
@@ -43,10 +45,12 @@ The analyze command works with the following types of directories:
4345
| Input Type | Description |
4446
|------------|-------------|
4547
| **AssetBundle build output** | The output path of an AssetBundle build |
46-
| **Addressables folder** | `StreamingAssets/aa` folder from a Player build |
48+
| **Addressables folder** | `StreamingAssets/aa` folder from a Player build, including BuildLayout files |
4749
| **Entities content** | `StreamingAssets/ContentArchives` folder for [Entities](https://docs.unity3d.com/Packages/[email protected]/manual/content-management-intro.html) projects |
4850
| **Player Data folder** | The `Data` folder of a Unity Player build |
4951
| **Compressed Player builds** | The `data.unity3d` file will be analyzed like AssetBundles |
52+
| **BuildReport files** | The build report is typically found at a path like `Library/LastBuild.buildreport`and is a binary serialized file |
53+
| **AssetDatabase Artifacts** | The tool will work to some extent with serialized files created in the AssetDatabase artifact storage, inside the Library folder |
5054

5155
> **Note**: Some platforms require extracting content from platform-specific containers first (e.g., `.apk` files on Android).
5256
@@ -56,9 +60,7 @@ The analyze command works with the following types of directories:
5660

5761
The analysis creates a SQLite database that can be explored using tools like [DB Browser for SQLite](https://sqlitebrowser.org/) or the command line `sqlite3` tool.
5862

59-
**Refer to the [Analyzer documentation](../../Analyzer/README.md) for complete database schema reference and usage examples.**
60-
61-
See also: [Analyze Examples](../../Documentation/analyze-examples.md)
63+
**Refer to the [Analyzer documentation](../../Analyzer/README.md) for the database schema reference and information about extending this command.**
6264

6365
---
6466

UnityDataTool/Commands/archive.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ contents/BuildPlayer-Scene2
6666

6767
| Command | Output | Use Case |
6868
|---------|--------|----------|
69-
| `archive extract` | Binary SerializedFiles | When you need the raw files |
70-
| `dump` | Human-readable text | When you need to inspect content |
69+
| `archive extract` | Binary SerializedFiles, .resS anything else inside the archive content | When you need all the raw files inside an archive |
70+
| `dump` | text | When you want to inspect object content |
7171

7272
The `dump` command can directly process archives without extracting first.
7373

UnityDataTool/Commands/dump.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,9 @@ PPtrs (Property Pointers) are Unity's mechanism for referencing objects:
103103
| `m_FileID` | Index into External References list (0 = same file) |
104104
| `m_PathID` | Object's Local File Identifier (LFID) in that file |
105105

106-
Use external references to resolve cross-file references.
106+
A null reference will have value m_FileID = 0, m_PathID = 0
107+
108+
The external reference table is used to resolve cross-file references. It always starts at index 1. m_FileID 0 is used for references within the current file.
109+
110+
107111

UnityDataTool/README.md

Lines changed: 6 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ A command-line tool for analyzing and inspecting Unity build output—AssetBundl
44

55
## Commands
66

7-
| Command | Description | Documentation |
8-
|---------|-------------|---------------|
9-
| [`analyze`](#analyze) | Extract data from Unity files into a SQLite database | [Full docs →](Commands/analyze.md) |
10-
| [`dump`](#dump) | Convert SerializedFiles to human-readable text | [Full docs →](Commands/dump.md) |
11-
| [`archive`](#archive) | List or extract contents of Unity Archives | [Full docs →](Commands/archive.md) |
12-
| [`find-refs`](#find-refs) | Trace reference chains to objects *(experimental)* | [Full docs →](Commands/find-refs.md) |
7+
| Command | Description |
8+
|---------|-------------|
9+
| [`analyze`](Commands/analyze.md) | Extract data from Unity files into a SQLite database |
10+
| [`dump`](Commands/dump.md) | Convert SerializedFiles to human-readable text |
11+
| [`archive`](Commands/archive.md) | List or extract contents of Unity Archives |
12+
| [`find-refs`](Commands/find-refs.md) | Trace reference chains to objects *(experimental)* |
1313

1414
---
1515

@@ -36,112 +36,6 @@ Use `--help` with any command for details: `UnityDataTool analyze --help`
3636

3737
Use `--version` to print the tool version.
3838

39-
---
40-
41-
## analyze
42-
43-
Extract information from Unity Archives and SerializedFiles into a SQLite database.
44-
45-
```bash
46-
UnityDataTool analyze <path> [options]
47-
```
48-
49-
| Option | Description | Default |
50-
|--------|-------------|---------|
51-
| `-o, --output-file` | Output database filename | `database.db` |
52-
| `-p, --search-pattern` | File filter pattern (`*.bundle`) | `*` |
53-
| `-s, --skip-references` | Skip CRC/reference extraction (faster) ||
54-
| `-v, --verbose` | Show detailed progress ||
55-
| `--no-recurse` | Don't recurse into subdirectories ||
56-
57-
**Example:**
58-
```bash
59-
UnityDataTool analyze /path/to/bundles -o my_database.db -p "*.bundle"
60-
```
61-
62-
📖 [Full documentation](Commands/analyze.md) — Troubleshooting, database schema, example inputs
63-
64-
---
65-
66-
## dump
67-
68-
Convert SerializedFiles to human-readable text format.
69-
70-
```bash
71-
UnityDataTool dump <path> [options]
72-
```
73-
74-
| Option | Description | Default |
75-
|--------|-------------|---------|
76-
| `-o, --output-path` | Output folder | Current folder |
77-
| `-f, --output-format` | Output format | `text` |
78-
| `-s, --skip-large-arrays` | Skip large array contents ||
79-
| `-i, --objectid` | Only dump this object ID | All objects |
80-
81-
**Example:**
82-
```bash
83-
UnityDataTool dump /path/to/file -o /output/path
84-
```
85-
86-
📖 [Full documentation](Commands/dump.md) — Output format details, archive support
87-
88-
---
89-
90-
## archive
91-
92-
Work with Unity Archives (AssetBundles, `.data` files).
93-
94-
### list
95-
96-
```bash
97-
UnityDataTool archive list <archive-path>
98-
```
99-
100-
### extract
101-
102-
```bash
103-
UnityDataTool archive extract <archive-path> [options]
104-
```
105-
106-
| Option | Description | Default |
107-
|--------|-------------|---------|
108-
| `-o, --output-path` | Output directory | `archive` |
109-
110-
**Example:**
111-
```bash
112-
UnityDataTool archive extract scenes.bundle -o contents/
113-
```
114-
115-
📖 [Full documentation](Commands/archive.md) — Sub-command details, comparison with dump
116-
117-
---
118-
119-
## find-refs
120-
121-
> ⚠️ Experimental
122-
123-
Find reference chains leading to specific objects. Requires a database from `analyze` (without `--skip-references`).
124-
125-
```bash
126-
UnityDataTool find-refs <database> [options]
127-
```
128-
129-
| Option | Description |
130-
|--------|-------------|
131-
| `-i, --object-id` | Object ID to trace |
132-
| `-n, --object-name` | Object name to trace |
133-
| `-t, --object-type` | Type filter (with `-n`) |
134-
| `-o, --output-file` | Output filename |
135-
| `-a, --find-all` | Find all chains (slower) |
136-
137-
**Example:**
138-
```bash
139-
UnityDataTool find-refs my_database.db -n "MyTexture" -t "Texture2D" -o refs.txt
140-
```
141-
142-
📖 [Full documentation](Commands/find-refs.md) — Use cases, output format
143-
144-
---
14539

14640
## Installation
14741

0 commit comments

Comments
 (0)