public GUIArea(Rect?area) { Rect screenRect = (area == null) ? GUIArea.GetStandardArea() : area.Value; if (GUIArea.rotated > 0) { screenRect.y += screenRect.height; float width = screenRect.width; screenRect.width = screenRect.height; screenRect.height = width; } GUILayout.BeginArea(screenRect); if (GUIArea.rotated > 0) { GUIUtility.RotateAroundPivot(-90f, Vector2.zero); } }
public GUIArea(Rect?area) { var a = area ?? GUIArea.GetStandardArea(); if (rotated > 0) { a.y += a.height; var w = a.width; a.width = a.height; a.height = w; } GUILayout.BeginArea(a); if (rotated > 0) { GUIUtility.RotateAroundPivot(-90f, Vector2.zero); } }