Unity import: nested prefab instances crash the prefab and scene converter
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 66/100
Hướng nghiên cứu
Start in Editor/Core/Unity/UnityPrefabConverter.cs, especially the transformOf construction around line 18, and trace how stripped Transform documents and m_Father references are handled. Find the Unity import tests and add a scene with two nested prefab instances. Done means the package imports without aborting, reports nested instances as skipped, preserves their children through attachment to a converted root or placeholder, and imports its textures and materials.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Current State
turian-cli import unitypackage fails on any .prefab or .unity that contains a nested prefab instance:
System.ArgumentException: An item with the same key has already been added. Key: 0
at Turian.Editor.Core.UnityPrefabConverter.Convert(...) in Editor/Core/Unity/UnityPrefabConverter.cs:line 18
Nested instances serialize their overridden objects as stripped documents (--- !u!4 &431236325 stripped, --- !u!224 &173553075 stripped). A stripped Transform/RectTransform has m_CorrespondingSourceObject and m_PrefabInstance but no m_GameObject, so Reference(o.Body["m_GameObject"]) returns 0 for each of them and the transformOf dictionary throws on the second one. The whole import aborts, including the textures and materials in the same package. Any real-world scene with two or more nested prefabs hits this.
Tasks
- Skip stripped objects when building
transformOf(or key only objects with a non-zerom_GameObject). - Report nested prefab instances in the import summary as today, without aborting.
- Children whose
m_Fatheris a stripped transform attach to the converted root (or the instance placeholder) instead of being lost. - Regression test with a scene containing two nested prefab instances.
Acceptance Criteria
- A package with nested prefab instances imports; the report lists them as skipped; textures and materials in the same package import.
- The regression test fails without the fix.
Related
- Unity conversion qualification (nested/variant prefabs).
- Ngôn ngữ chính
- C#
- Star
- 1
- Fork
- 1
- Merge trung bình
- 2 giờ 7 phút
- Pull request đã merge (30 ngày)
- 38
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
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 MASS4ORG/Turian
-
c:assets p:low size:XS t:task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
c:engine t:refactor
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
MASS4ORG/Turian#344 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
c:engine c:platform p:low size:S t:feature
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
c:ui p:medium size:M t:feature
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
c:build p:low size:XS t:enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của MASS4ORG/Turian
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
bug elsa 3 prio low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
elsa-workflows/elsa-core#9154 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
.NET triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
microsoft/agent-framework#9918 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
QuantConnect/Lean#10005 ·
Maintainer thường phản hồi trong vòng 1 ngày