Reproduction steps:
1. Open the attached “IN-103686.zip” project
2. Select the “New Prefab Variant” from the Project Window
3. In the Inspector, find the “My Script” Component
4. Click the three dots on the Component and select “Add Element”
5. Revert the change by right-clicking on the “List Of Elements” > Revert
6. Double-click on the “New Prefab Variant” to open it in context
7. Click on the “Overrides” dropdown in the Inspector
8. Observe the overrides
Expected result: It should be detected that SerializedReference is unused, and the overrides should appear in the "Unused Overrides" section of the Overrides panel
Actual result: “New Prefab Variant” has a “My Script (Script)” override
Reproducible with: 2022.3.62f1, 6000.0.51f1, 6000.1.7f1, 6000.2.0b5
Couldn’t test with: 2022.1.0a1 (Revert button does not exist there)
Reproduced on: Windows 11 Pro (24H2)
Not reproduced on: No other environment tested
Notes:
- Does not reproduce if the “Element 0” is reverted first and then clicking the Revert on “List Of Elements”
- Repeating the process adds new overrides every time in the prefab file