You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Documentation/command-serialized-file.md
+30-7Lines changed: 30 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -261,13 +261,36 @@ Each element of `typeTrees` and `serializedReferenceTypeTrees` contains per-type
261
261
262
262
### Metadata Fields
263
263
264
-
| Field | Description |
265
-
|-------|-------------|
266
-
|**Unity Version**| The Unity version string used to build this file (e.g. `"2022.1.20f1"`, `"6000.0.65f1"`). |
267
-
|**Target Platform**| Numeric platform identifier. Common values: `2` = OSX Standalone, `9` = iOS, `13` = Android, `19` = Windows Standalone x64. See [BuildTarget](https://docs.unity3d.com/ScriptReference/BuildTarget.html) for details. |
268
-
|**TypeTree Definitions**| Whether the definition of the types are embedded in the file. `Inline` in Editor and TypeTree-enabled builds. `No` in Player builds with TypeTrees stripped (the default). TypeTrees are required for the `objectlist` and `externalrefs` subcommands to show type names. `External` when the TypeTrees are in an external shared file. |
269
-
|**TypeTree Count**| Number of TypeTrees defined in the file. Each TypeTree corresponds to a unique type used by objects in the file. This array is present even when TypeTree definitions are not stored inline. |
270
-
|**RefType Count**| Number of TypeTrees for SerializeReference classes saved in the file. |
264
+
The text and JSON outputs use different field names and representations for some fields.
265
+
266
+
| Text Field | JSON Field | Description |
267
+
|------------|------------|-------------|
268
+
|**Unity Version**|`unityVersion`| The Unity version string used to build this file (e.g. `"2022.1.20f1"`, `"6000.0.65f1"`). |
269
+
|**Target Platform**|`targetPlatform`| Numeric platform identifier. Common values: `2` = OSX Standalone, `9` = iOS, `13` = Android, `19` = Windows Standalone x64. See [BuildTarget](https://docs.unity3d.com/ScriptReference/BuildTarget.html) for details. |
270
+
|**TypeTree Definitions**|`enableTypeTree`| Whether TypeTree blobs are stored in this file. The text output derives a descriptive string from the raw boolean and the parsed type entries; the JSON output exposes the raw boolean directly. Text values: `No` — TypeTrees absent (default Player build); `Inline` — all TypeTree blobs are embedded in the file (Editor and TypeTree-enabled builds); `External` — TypeTree blobs were extracted to a separate store (version ≥ 23); `Mixed` — entries disagree (unexpected; indicates a parser or file anomaly); `Unknown` — `enableTypeTree` is true but no type entries were parsed. TypeTrees are required for the `objectlist` and `externalrefs` subcommands to show type names. |
271
+
|**TypeTree Count**|`typeTreeCount`| Number of regular (object) type entries recorded in the file. Present even when TypeTree definitions are not stored inline. |
272
+
|**RefType Count**|`serializedReferenceTypeTreeCount`| Number of type entries for `[SerializeReference]` types recorded in the file. Always `0` for files with version < 20. |
273
+
|*(JSON only)*|`typeTrees`| Array of per-type detail objects for the regular type entries. `null` when parsing failed or was not attempted. See **Per-Type Entry Fields** below. |
274
+
|*(JSON only)*|`serializedReferenceTypeTrees`| Array of per-type detail objects for the `[SerializeReference]` type entries. Empty array for files with version < 20. See **Per-Type Entry Fields** below. |
275
+
276
+
### Per-Type Entry Fields
277
+
278
+
Each element of `typeTrees` and `serializedReferenceTypeTrees` in the JSON output contains the following fields:
279
+
280
+
| JSON Field | Description |
281
+
|------------|-------------|
282
+
|`persistentTypeID`| Unity ClassID (e.g. `114` = MonoBehaviour). `-1` for `[SerializeReference]` entries whose type has no built-in ClassID. |
283
+
|`isStrippedType`|`true` for types representing prefab-stripped objects (the `stripped` keyword in YAML). Orthogonal to TypeTree presence. |
284
+
|`scriptTypeIndex`| Index into the file's MonoScript reference list. `-1` for native Unity types. |
285
+
|`scriptID`| 128-bit hash (MD4 of assembly + namespace + class name) identifying the MonoScript. All-zeros when not applicable. |
286
+
|`oldTypeHash`| Hash of the TypeTree content as originally written; used for compatibility checking at load time. |
287
+
|`typeTreeContentHash`| XXH3 hash of the TypeTree blob. All-zeros for files with version < 23. |
288
+
|`typeTreeSerializedSize`| Byte size of the TypeTree blob for this entry. `0` when `inlineTypeTree` is false. |
289
+
|`inlineTypeTree`|`true` when the TypeTree blob is present inline in the file's metadata. |
290
+
|`className`| C# class name; non-empty only for `[SerializeReference]` entries (version ≥ 21). |
291
+
|`namespaceName`| C# namespace; non-empty only for `[SerializeReference]` entries (version ≥ 21). |
292
+
|`assemblyName`| Assembly name; non-empty only for `[SerializeReference]` entries (version ≥ 21). |
293
+
|`typeDependencies`| Array of indices into `serializedReferenceTypeTrees` listing which `[SerializeReference]` types objects of this type may hold. Empty for `[SerializeReference]` entries or files with version < 21. |
0 commit comments