Search Issue Tracker

Not Reproducible

Votes

0

Found in

2021.3.39f1

2022.3.33f1

6000.0.6f1

Issue ID

UUM-73999

Regression

No

Cannot revert the Prefab instance to the state of the Prefab Asset when the RequireComponent attribute is connected to the Component in the Prefab

--

-

How to reproduce:
1. Open the “ReproduceBugs“ project
2. Open the “TestScene“
3. Open the “GameObject“ Prefab instance in isolation
4. Add the “testbla“ Script component to the “GameObject“
5. Return to the “GameObject“ Prefab instance edit in context
6. Add the Animator component to the “GameObject“
7. Un-comment the 5th line of code in the “testbla.cs“ script
8. Right-click on the Animator component and choose “Added Component > Revert“

Expected result: No errors are thrown and the “GameObject“ Prefab instance gets reverted to the Prefab state
Actual result: An error “Can't remove Animator because testbla (Script) depends on it. UnityEditor.GenericMenu:CatchMenu (object,string[],int)“ is thrown and the “GameObject“ Prefab instance doesn’t get reverted to the prefab state

Reproducible with: 2021.3.39f1, 2022.3.33f1, 6000.0.6f1

Reproducible on: macOS 14.5 (Intel), Windows 10 Pro (22H2)
Not reproducible on: No other environments tested

Note: Since the Prefab itself has the required Component, reverting to the Prefab state should satisfy the restriction from the RequireComponent attribute

  1. Resolution Note:

    Thank you for reporting a bug to Unity.

    We have reviewed the issue carefully, and in this case, the team is unable to reproduce this bug.

    Today we will be closing this case. Thank you again for taking the time to report this issue, and please let us know if there is anything else that changes the impact or severity of this issue.

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.