Skip to content

Commit a541921

Browse files
committed
preview area now fit inside gui box
1 parent 3d886ac commit a541921

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Editor.Extras/Drawers/PreviewMeshDrawer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public override void OnGUI(Rect position)
163163
{
164164
return;
165165
}
166-
float currentWidth = _width == -1 ? (int) EditorGUIUtility.currentViewWidth : _width;
166+
float currentWidth = _width == -1 ? (int) position.width : _width;
167167
currentWidth = Math.Max(currentWidth, _c_MIN_WIDTH);
168168

169169
if (position.height == 0f)

0 commit comments

Comments
 (0)