Search Issue Tracker
By Design
Votes
1
Found in
2022.1.17f1
2022.2.0b8
2023.1.0a11
Issue ID
UUM-14819
Regression
Yes
Callback methods are not called when the element is removed during “clicked” event
Reproduction steps:
1. Open the user’s attached project
2. Open Assets/Scenes/Sample Scene
3. Enter Play mode
4. Press the “Open Panel” button
5. Press the “Play SFX” button
6. Press the “Close Panel and Play SFX” button
7. Press the “Open Panel” button
8. Press “Play SFX and Close Panel”
Expected result: The sound can be heard when pressing all buttons
Actual result: The sound is only heard when the “Play SFX” button is pressed
Reproducible with: 2022.1.0a14, 2022.1.17f1, 2022.2.0b8, 2023.1.0a11
Not reproducible with: 2020.3.39f1, 2021.3.10f1, 2022.1.0a13
Reproducible on: macOS 12.5.1
Note: To reproduce this issue on 2020.3.39f1 UI Toolkit needs to be added as a package through Package Manager
Comments (1)
-
kamil-dawidow
Oct 20, 2022 08:14
This issue is still affecting our project. What's the ETA on a fix?
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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
Resolution Note:
This is working as intended. Elements don't receive events when they're removed from their parent panel. The PR identified as introducing a regression enforced this behavior which was a fix to another bug.
Furthermore, in the repro project, button.clicked and button.RegisterCallback<ClickEvent>() are used as though they were synonymous, but they are not. One always happens before the other, and stopping one doesn't stop the other. Removing an element from its panel between the two should prevent the last of the two from being called.