private static void DrawLabelOutsideRect(Rect position, string label, LabelLocation labelLocation)
{
Matrix4x4 matrix = GUI.matrix;
Rect rect = new Rect(position.x, position.y - 18f, position.width, 16f);
switch (labelLocation)
{
case LabelLocation.Bottom:
rect = new Rect(position.x, position.yMax, position.width, 16f);
break;
case LabelLocation.Left:
GUIUtility.RotateAroundPivot(-90f, position.center);
break;
case LabelLocation.Right:
GUIUtility.RotateAroundPivot(90f, position.center);
break;
}
EditorGUI.BeginDisabledGroup(true);
GUI.Label(rect, label, styles.label);
EditorGUI.EndDisabledGroup();
GUI.matrix = matrix;
}