Skip to content

Commit 61b47b3

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 61b47b3

File tree

1 file changed

+38
-8
lines changed

1 file changed

+38
-8
lines changed

UnityDataTool/README.md

Lines changed: 38 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,44 @@ 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+
The following SQL errors may occur when running the analyze command:
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+
The likely cause of these errors is the same serialized file name appearing in more than Player or AssetBundle file that is processed by Analyze.
126+
127+
This may occur:
128+
129+
* If you analyze files from more than one version of the same build (e.g. if you run it on a directory that contains two different builds of the same project in separate sub-directories).
130+
* If two scenes with the same filename (but different paths) are included in a build.
131+
* In a build that used AssetBundle variants.
132+
133+
The conflicting name makes it impossible to uniquely identify the serialized file and its object in the database, and makes it ambiguous how to interpret dependencies from one file to another.
134+
135+
The [comparing builds](../Documentation/comparing-builds.md) topic gives some ideas about how to run Analyze more than once if you want to compare two different versions of the same build.
136+
107137
## dump
108138

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

0 commit comments

Comments
 (0)