Search Issue Tracker
By Design
Votes
0
Found in
2021.3.34f1
2022.3.18f1
2023.2.7f1
2023.3.0b4
Issue ID
UUM-61551
Regression
No
UI Builder button EventListeners stop working when the UI Document gets disabled and re-enabled in Play Mode
How to reproduce:
1. Open the “UIBuild.zip“ project
2. Open the “SampleScene”
3. Enter the Play Mode
4. Click on the Button in the Game View (to see that the button click event is registered)
6. In the Hierarchy select the "GameObject"
7. Disable and re-enable the UI Document Component
8. Click the Button again
9. Observe the Console window
Expected results: The Button click event is being listened to and displays “I am working“ in the Console after clicking it
Actual results: The Button click event is not being listened to and does not display “I am working“ in the Console after clicking it
Reproducible with: 2021.3.34f1, 2022.3.18f1, 2023.2.7f1, 2023.3.0b4
Reproduced on: Windows 11 Pro
Not reproduced on: No other environment tested
Note: The reporter states that “This seems to only happen with button ClickEvent listeners because other listeners seem to work after reenabling”
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
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
Resolution Note:
Everything here is working as intended. Elements are regenerated when UIDocument gets disabled and re-enabled. Callbacks registered during the Start method refer to elements that no longer exist, hence why they aren't invoked anymore.