Search Issue Tracker
Fixed in 2021.2.X
Fixed in 2020.3.X, 2021.1.X
[UI Toolkit] UI becomes unresponsive after setting its width to 1.0E+11 and higher percentage value
How to reproduce it:
1. Open the attached project "1324728_issue.zip"
2. Open a Memory Profiler window (Menu Bar > Windows > Analysis > Memory Profiler)
3. Try to click on the "Compare Snapshots" button on the left side of the Memory Profiler window
4. Observe the "Compare Snapshots" button
Expected result: "Compare Snapshots" button is responsive to mouse events and gets a blue underline
Actual result: "Compare Snapshots" button is unresponsive to mouse events
Reproducible with: 1.0.0-preview.14 (2020.3.6f1, 2021.1.5f1), built-in UI Toolkit (2021.1.5f1, 2021.2.0a15)
Could not test with: 2018.4.34f1, 2019.4.25f1 (UI Toolkit is not introduced yet)
- This issue can be fixed by going to Packages\com.unity.memoryprofiler-ui-tk-bug\Editor\UI\AnalysisWindow folder and opening a "MemoryUsageBreakdown.cs" file in Visual Studio. Uncomment line 144 and comment line 147 and save this file
- Could not reproduce with new project and UI Document
- UI gets broken when the width value is 1.0E+11 and a higher percentage
The issue here was that an element ("memory-usage-bar__element__unknown") was set with a huge width value, leading to float calculation inaccuracies in the Yoga layout calculation due to difference in magnitude between parent and child areas. This caused the panel's world bounding box to be calculated as being outside of the panel area, causing user interactions in the panel to be rejected.
A fix has been implemented to prevent this from happening in the future and will be released soon. In general, it would be good practice to verify dynamically computed values to detect situations where they don't make sense.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- GUI button looks different from Editor in a Build
- Live Profiler Timeline keeps losing frame data while scrolling inside Profiler window
- Input.mouseScrollDelta.y is not correctly mapped to mouse wheel when running an iOS app on Apple Silicon Mac
- PrntScreen (Snapshot) key is not working on UWP on both old and new input systems
- Show compiled code for compute shaders has the "Cancel" button greyed out