How to reproduce:
1. Open the attached “IN-150246” project
2. Open the “SampleScene” scene
3. Go to Tools → Repro
4. Click “Probe class fields (edit mode)
5. Open UninitializedInstanceRepro.cs
6. Add a space anywhere in the UninitializedInstanceRepro.cs and save the script so that Unity recompiles
7. Go to Tools → Repro
8. Click “Probe class fields (edit mode)
9. Observe the console
Actual Result:
After step 4 console shows:
A : null (correct)
B : null (correct)
C : null (correct)
D : EXISTS but its collections are null <-- no constructor ran
and after step 8, console shows:
A : EXISTS but its collections are null <-- no constructor ran
B : exists and is properly constructed
C : null (correct)
D : EXISTS but its collections are null <-- no constructor ran
Expected Result: A and D are null (like C), or properly constructed (like B)
Reproducible with: 6000.0.0f1, 6000.0.83f1, 6000.3.24f1, 6000.6.1f1, 6000.7.0b1
Reproducible on: Windows 10 (by user), Windows 11
Not reproducible on: No other environments tested
Notes:
- NullReferenceException: Object reference not set to an instance of an object UninitializedInstanceRepro.Start () (at Assets/Scripts/UninitializedInstanceRepro.cs:25) error is thrown on entering Play mode
- Adding parameterless constructor in ThingSerializableNoDefaultCtor.cs fixes the issue