Search Issue Tracker
Won't Fix
Votes
0
Found in
2019.3.0b1
2019.3.0b3
2020.1.0a1
Issue ID
1185141
Regression
Yes
GUIContent with Texture does not follow GUILayout.Width style
How to reproduce:
1. Open the user's project
2. Open Tools > Example
Expected result: "Test 1" and "Test 2" Width is 150
Actual result: Width is larger
Reproducible with - 2019.3.0b1, 2019.3.0b4, 2020.1.0a5
Not reproducible with - 2017.4.32f1, 2018.4.8f1, 2019.2.7f2, 2019.3.0a11
Could not test with - 2019.3.0a12 (license issue)
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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Resolution Note (2020.1.X):
This behavior has not changed at all. GUILayout.Width is still followed. The computation of the button size uses the actual size of the texture and not the render size (16px), unless user calls EditorGUIUtility.SetIconSize(). It was working before because the prefab icon's size was 64px. But it is now 128px, which increased the button size by 64px and then exceeds 150px.
User can fix this issue on his side setting the icon size by calling EditorGUIUtility.SetIconSize().
For example,
var oldSize = EditorGUIUtility.GetIconSize()
EditorGUIUtility.SetIconSize(16);
// Render UI
EditorGUIUtility.SetIconSize(oldSize);