Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#340 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
66/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
csharp, unity
Área
game-dev

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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).
Lenguaje dominante
C#
Estrellas
1
Forks
1
Merge medio
1 h 57 min
PR fusionados (30 d)
36

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de MASS4ORG/Turian

Todos los issues de MASS4ORG/Turian

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.