Search Issue Tracker
Fixed in 2021.2.X
Votes
5
Found in
2018.4
2019.2.0a13
2019.4
2020.3
2021.1
2021.2.0a7
Issue ID
1158741
Regression
No
OnTransformParentChanged is called twice when deleting the gameobject in the hierarchy while in play mode
How to reproduce:
1. Open the attached project ("OnTransformParentChanged.zip")
2. Open the repro scene ("SampleScene")
3. Enter the play mode
4. Delete the children object from the Hierarchy
5. Inspect the console
Expected results: OnTransformParentChanged is called once
Actual results: OnTransformParentChanged is called twice
Reproducible with: 2018.4.33f1, 2019.4.24f1, 2020.3.3f1, 2021.1.2f1, 2021.2.0a7
Not reproducible with: 2021.2.0a9, 2021.2.0a11
Could not test with: 2021.2.0a8 (Backend Errors)
Notes:
1. During the first "OnTransformParentChanged" call, the parent is set to null, and during the second call it is set to the old parent value again
2. Destroying the object with "Destroy" method does not result in any "OnTransformParentChanged" calls
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [UI Builder] Viewport's gizmos for Margin and Padding disappear when dragging to modify the value and the cursor leaves the Spacing section
- "Multiplayer Center" window does not reflect changes made in "Other Packages" section
- Crash on D3DKMTOpenResource when capturing with RenderDoc while GPU Skinning is set to GPU(Batched)
- Editing and saving Curve changes in UI Builder window throws multiple errors in the Console
- [UI Builder] Value is not selected when left clicking on Spacing/Border Widget values
Resolution Note (fix version 2021.2):
Fixed in 2021.2.0a9