Search Issue Tracker

Fixed

Fixed in 6000.0.77f1, 6000.3.17f1, 6000.4.10f1, 6000.5.0b11, 6000.6.0a6

Under Consideration for 6000.6.X

Votes

0

Found in

6000.0.72f1

6000.3.12f1

6000.4.1f1

6000.5.0b2

6000.6.0a2

Issue ID

UUM-139664

Regression

Yes

The reference to a Prefab Variant is lost on instantiation when it is serialized in a parent's component

Serialization

-

How to reproduce:
1. Open the attached “IN-136453“ project
2. Open the “SampleScene“ scene
3. Enter Play mode
4. In the Project window, open the “Prefab_Base“ Prefab
5. In the Hierarchy, select the “SubInstantiator“ GameObject and drag the “Prefab_Variant_Variant“ asset to the “To Instanciate Specific“ field in the Inspector
6. In the Hierachy, exit Prefab edit mode (Arrow to the left at the top of the window)
7. Drag the “Prefab_Variant“ asset from the Project window to the Hierarchy window
8. Observe the value of “To Instanciate Specific“ in the “SubInstantiator“ of the GameObject from step 7

Actual result: The reference was lost and the value is null
Expected result: The value matches the Prefab and is set to “Prefab_Variant_Variant“

Reproducible with: 2023.2.0a22, 6000.0.72f1, 6000.3.12f1, 6000.4.1f1 (336a400b9ea2), 6000.5.0b2, 6000.6.0a2
Not reproducible with: 2023.2.0a21

Reproducible on: Windows 11
Not reproducible on: No other environments tested

Workaround: Instead of serializing the prefab as a class of the component which you wish to use, serialize it as a GameObject

Notes:
- The “SubInstantiator” GameObject is a child of the Prefabs
- When using an Editor version before the regression and upgrading to a version which should have the bug, the bug does not reproduce

  1. Resolution Note:

    Fixed in 6000.6.0a6

  2. Resolution Note (fix version 6000.6.0a6):

    Fixed in 6000.6.0a6

  3. Resolution Note (fix version 6000.5.0b11):

    Fixed in 6000.5.0b11

  4. Resolution Note (fix version 6000.4.10f1):

    Fixed in 6000.4.10f1

  5. Resolution Note (fix version 6000.3.17f1):

    Fixed in 6000.3.17f1

  6. Resolution Note (fix version 6000.0.77f1):

    Fixed in 6000.0.77f1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.