How to reproduce:
1. Open the “IN_76367”
2. In the project window select the “Test” prefab
3. In the Inspector add the “TestScript” component
4. In the Project window right-click on the “Test” prefab and press “Reimport”
5. Observe the Inspector
Expected result: “TestScript” component stays added to the “Test” prefab
Actual result: “TestScript“ component is removed from the “Test” prefab
Reproducible with: 2022.3.12f1, 2022.3.30f1, 6000.0.3f1, 6000.1.0b4
Not reproducible with: 2021.3.38f1, 2022.3.11f1
Reproducible on: macOS Sonoma 14.3.1 (M1)
Not reproducible on: Windows 10 Pro
Note: reproducible on a new project
Workarounds:
Adding component by opening the prefab:
1. Open the “Test” prefab by pressing “Open” in the inspector or double-clicking
2. Add the “TestScript” component to the prefab through the Inspector
Saving changes before reimporting the prefab:
1. Select the “Test” prefab and in the Inspector add “TestScript” component
2. Save changes made in the Inspector