Search Issue Tracker

Fixed in 2022.1.X

Votes

0

Found in

2021.2

2021.2.0a9

2021.2.0b16

2022.1

Issue ID

1372196

Regression

Yes

"<...> had become dangling during an undo operation" warning when undoing and redoing Prefab's Add Component and Apply Override

Scene Management

-

Reproduction steps:
1. Open attached project "DanglingWarning.zip" and scene "SampleScene"
2. In Hierarchy window, select "Cube" Prefab
3. In Inspector window, add any new Component
4. In Inspector window's Overrides dropdown, click Apply All
5. Undo
6. Redo
7. Observe Console window

Expected result: No warning
Actual result: "Component of type <...> was added to Cube using GameObject.AddComponent() and had become dangling during an undo operation.
Use Undo.AddComponent to correctly add a component which can be handle by the undo system" warning

Reproducible with: 2021.2.0a9, 2021.2.0b16, 2022.1.0a11
Not reproducible with: 2019.4.30f1, 2020.3.19f1, 2021.1.23f1, 2021.2.0a8, 2022.1.0a12

  1. Resolution Note (fix version 2022.1):

    Fixed in 2022.1.0a12

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.