Skip to content

Commit 746c11e

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 746c11e

File tree

1 file changed

+32
-8
lines changed

1 file changed

+32
-8
lines changed

UnityDataTool/README.md

Lines changed: 32 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,38 @@ 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).
114+
115+
The following SQL error can occur if you try to Analyze files from two different versions of the same build:
116+
117+
```
118+
SQLite Error 19: 'UNIQUE constraint failed: objects.id'
119+
```
120+
121+
or
122+
123+
```
124+
SQLite Error 19: 'UNIQUE constraint failed: serialized_files.id'.
125+
```
126+
127+
That happens because the same name for a Serialized File could be repeated in more than one AssetBundle or Player build file. A repeated file name could also occur within a single build if two scenes with the same filename (but different paths) are included in the build.
128+
129+
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 run Analyze more than once and compare the results.
130+
107131
## dump
108132

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

0 commit comments

Comments
 (0)