Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Unity import: nested prefab instances crash the prefab and scene converter

オープン
#340 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
66/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
csharp, unity
領域
game-dev

調査の方向性

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 の本文から書いたものです。

説明

c:assets p:medium size:S t:bug

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-zero m_GameObject).
  • Report nested prefab instances in the import summary as today, without aborting.
  • Children whose m_Father is 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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

MASS4ORG/Turian のほかの issue

MASS4ORG/Turian の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。