Support SerializedFile v27 (Unity 7000.0)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C#
- Star
- 841
- Fork
- 75
- Merge trung bình
- 1 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Unity-Technologies/UnityDataTools
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Unity-Technologies/UnityDataTools#116 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Tất cả issue của Unity-Technologies/UnityDataTools
Issue tương tự
-
type:task ux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
elsa-workflows/elsa-foundation#5253 ·
Maintainer thường phản hồi trong vòng 1 ngày