Unity import: nested prefab instances crash the prefab and scene converter
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 66/100
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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).
- 主要言語
- C#
- スター
- 1
- フォーク
- 1
- 平均マージ
- 1時間 57分
- マージ済み PR(30日)
- 36
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MASS4ORG/Turian のほかの issue
-
c:assets p:low size:XS t:task
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
c:engine c:platform p:low size:S t:feature
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
-
c:ui p:medium size:M t:feature
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
c:build p:low size:XS t:enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
メンテナーはふだん 1 日以内に返信
MASS4ORG/Turian の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 2 日以内に返信
-
bug effort:S P3
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
nightscout/nocturne#3093 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 3 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信