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