public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
if (property.propertyType == SerializedPropertyType.String)
{
label = EditorGUI.BeginProperty(position, label, property);
position = EditorGUI.MultiFieldPrefixLabel(position, 0, label, 1);
EditorGUI.BeginChangeCheck();
int indentLevel = EditorGUI.indentLevel;
EditorGUI.indentLevel = 0;
string str = EditorGUI.TextArea(position, property.stringValue);
EditorGUI.indentLevel = indentLevel;
if (EditorGUI.EndChangeCheck())
{
property.stringValue = str;
}
EditorGUI.EndProperty();
}
else
{
EditorGUI.LabelField(position, label.text, "Use Multiline with string.");
}
}
}