Support SerializedFile v27 (Unity 7000.0)
还没有人认领这个 Issue。
评估
调研方向
Start with SerializedFileDetector.MaxMetadataParseVersion and the serialized-file metadata parser; then inspect the native UnityFileSystemApi snapshots and dump handling for data-component payloads. The issue also points to UnityProjects/LeadingEdge and the docs describing the format. Rebuild reference files with Unity 7000.0, ideally including a data component, and verify v27 metadata commands, dump, and analyze work while older versions remain supported.
由索引模型根据 Issue 内容生成。
描述
Unity 6.7 writes v26 of the SerializedFile format (supported since #130). Unity 7000.0 (current trunk) has moved to v27:
kDataComponentOwners = 27, // Data components' owner GameObject references move from the front of their payloads to a metadata table after the user information string; the payload is exactly what the stored TypeTree describes
Today every SerializedFile from a 7000.0 build is rejected:
SerializedFile version 27 is not supported. UnityDataTool supports up to version 26. Please use a newer version of UnityDataTool to read this file.
As a result, dump, analyze and most serialized-file subcommands don't work on 7000.0 output. serialized-file header still works and shows the version.
Format change
The metadata section gains one table after the user information string. It is always present in v27, even when empty:
SInt32count- per row, two fileIDs (each
SInt64, 4-byte aligned like other fileIDs in the metadata): the data component's fileID, then the fileID of its owner GameObject, which is in the same file.
A row exists only for data-component objects. Previously the owner reference was stored at the front of the data component's payload, so the payload is now exactly what its TypeTree describes.
Quick experiment
I built a Content Directory with a local trunk editor and tried two local changes:
- Raising
SerializedFileDetector.MaxMetadataParseVersionto 27 was enough for theserialized-filemetadata commands. The parser stops before the user information string, so it never reaches the new table. dumpandanalyzealso need a newer native library. The current UnityFileSystemApi snapshot rejects v27 files ("File may be corrupted or was serialized with a newer version of Unity"). With the UnityFileSystemApi.dll from the trunk editor build (Data/Tools), both commands worked.
That build had no data components, so the new table was empty.
Work includes
- Update to a new UnityFileSystemApi snapshot (Windows/Mac/Linux) from a 7000.0 build.
- Raise
MaxMetadataParseVersionto 27 and keep reading older versions. Optionally parse the owner table, e.g. soserialized-filecan report it. - Check that
dumphandles data components correctly now that their payload no longer starts with the owner reference. - Add v27 reference files for automated tests, e.g. by rebuilding
UnityProjects/LeadingEdgewith 7000.0, ideally with a data component so the owner table isn't empty. - Update docs that describe the SerializedFile format and its version history.
- 主要语言
- C#
- 星标
- 841
- 派生
- 75
- 平均合并
- 1 天 7 小时
- 30 天内合并 PR
- 3
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Unity-Technologies/UnityDataTools 的其他 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
Unity-Technologies/UnityDataTools#116 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 3/5 1-2 天 新手友好度 56/100
-
enhancement
难度 3/5 1-2 天 新手友好度 48/100
-
难度 4/5 3-5 天 新手友好度 48/100
查看 Unity-Technologies/UnityDataTools 的全部 Issue
相似的 Issue
-
type:task ux
难度 2/5 1-3 小时 新手友好度 72/100
elsa-workflows/elsa-foundation#5253 ·
维护者通常 1 天内回复