Search Issue Tracker
Fixed in 2021.1.X
Votes
0
Found in
2019.4
2019.4.1f1
2021.1
Issue ID
1289492
Regression
No
[UIElements] EditorGUIUtility.currentWidth returns 0 when using it in a VisualElement
How to reproduce:
1. Open the user's attached "UnityBugUIToolkitInspectorWidth.zip" project
2. Open the "SampleScene" Scene
3. Select "GameObject1" GameObject in the Hierarchy window
4. Observe the Console log
Expected result: Inspector window's width is printed in the Console log
Actual result: "inspector width = 0" is printed in the Console log (indicating that Inspector window's width is not received correctly)
Reproducible with: 2019.4.14f1, 2020.1.13f1, 2020.2.0b11, 2021.1.0a4
Could not test with: 2018.4.29f1 (UIElements are not supported)
Notes:
- EditorGUIUtility.currentWidth returns correct width in the very first time, but later returns 0
- EditorGUIUtility.currentWidth returns correct width when not using it with UIElements
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
- [Android][BiRP] Depth processing is handled incorrectly on certain Android devices when using 2 camera's
- [APV] Cancelling Display Dialog Error is thrown after Adaptive Probe Volumes tab is open in Lighting Window
- [APV] NullReferenceException is thrown when baking Adaptive Probe Volume for a Terrain with Non-GI Contributing Tree Prototypes and multiple APV objects with different LayerMasks are present on the scene
- Hands are not recognized when using Hololens 2
- "OnTriggerExit2D" is called before "OnTriggerEnter2D" when object is destroyed immediately
Resolution Note (fix version 2021.1):
Fixed in: 2021.1.0a9 wont be backported as the fix is to just make it more obvious this functionality is not supported outside of IMGUI