Skip to content

Commit 512d93f

Browse files
Document more expected errors from Analyze
Mention errors that migth be visible (based on testing a folder with AssetBundles from different builds all being mixed together)
1 parent babbf00 commit 512d93f

File tree

1 file changed

+30
-8
lines changed

1 file changed

+30
-8
lines changed

UnityDataTool/README.md

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,6 @@ Example: `UnityDataTool analyze /path/to/asset/bundles -o my_database.db -p "*.b
6262
**Refer to this [documentation](../Analyzer/README.md#How-to-use-the-database) for more information
6363
about the output database structure.**
6464

65-
Note: If a SerializedFile is built without TypeTrees, then the command will not be able to extract information about the contained objects. It will print an error similar to this example, then skip to the next file:
66-
67-
```
68-
Error processing file: C:\Src\TestProject\Build\Player\TestProject_Data\level0
69-
System.ArgumentException: Invalid object id.
70-
```
71-
72-
See [this topic](../Documentation/unity-content-format.md) for more information about TypeTrees.
7365

7466
### Example Input to the Analyze command
7567

@@ -104,6 +96,36 @@ For Player builds there is no single -p option that can catch all SerializedFile
10496

10597
The `--no-recurse` option can reduce the volume of these warnings.
10698

99+
100+
### Errors when TypeTrees are missing
101+
102+
If a SerializedFile is built without TypeTrees, then the Analyze command will not be able to extract information about the contained objects. It will print an error similar to this example, then skip to the next file:
103+
104+
```
105+
Error processing file: C:\Src\TestProject\Build\Player\TestProject_Data\level0
106+
System.ArgumentException: Invalid object id.
107+
```
108+
109+
See [this topic](../Documentation/unity-content-format.md) for more information about TypeTrees.
110+
111+
### SQL Errors
112+
113+
Analyze assumes that it is only examining the result of a single build, or related builds (e.g. a Player build plus an Addressables build). If you try to analyze files from two different versions of the same build then some files will fail during processing with these type of error:
114+
115+
```
116+
SQLite Error 19: 'UNIQUE constraint failed: objects.id'
117+
```
118+
119+
or
120+
121+
```
122+
SQLite Error 19: 'UNIQUE constraint failed: serialized_files.id'.
123+
```
124+
125+
That happens because the exact same object could appear in the more than one AssetBundle or Player build file.
126+
127+
In future, support could be added to analyze different versions of the same build into a single database. In the meantime, the [comparing builds](../Documentation/comparing-builds.md) gives some ideas about how to compare two versions of the same AssetBundle by running Analyze more than once.
128+
107129
## dump
108130

109131
This command dumps the contents of a SerializedFile into a file of the selected format. It currently

0 commit comments

Comments
 (0)