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
- Warnings "Attempting to draw with missing bindings" are logged when opening the HDRP VFX Template Sample Scene
- Red spots appear when Blending Lighting Scenarios using Adaptive Probe Volumes
- [Windows] About Unity Window needs to be opened twice to adapt to resolution
- NullReferenceException and temporary graph corruption after entering playmode if output node connection was changed
- Sprite Renderer with Animation does not reflect Sprite changes in the Scene when switching Mask Interaction
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);