public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
if (property.propertyType == SerializedPropertyType.String)
{
label = EditorGUI.BeginProperty(position, label, property);
Rect labelPosition = position;
labelPosition.height = 16f;
position.yMin += labelPosition.height;
EditorGUI.HandlePrefixLabel(position, labelPosition, label);
EditorGUI.BeginChangeCheck();
string str = EditorGUI.ScrollableTextAreaInternal(position, property.stringValue, ref this.m_ScrollPosition, EditorStyles.textArea);
if (EditorGUI.EndChangeCheck())
{
property.stringValue = str;
}
EditorGUI.EndProperty();
}
else
{
EditorGUI.LabelField(position, label.text, "Use TextAreaDrawer with string.");
}
}
}