Пример #1
0
 public override void OnGUI(Rect _position, SerializedProperty _property, GUIContent _label)
 {
     if (_property.propertyType != SerializedPropertyType.String)
     {
         EditorGUI.PropertyField(_position, _property, _label);
     }
     else
     {
         var rects = _position.AbsSplitX(-25f);
         EditorGUI.PropertyField(
             rects[0].Padding(0, 0, 0, 1f),
             _property, _label);
         if (GUI.Button(rects[1], "...", "minibutton"))
         {
             _property.stringValue = ShowPanel(_property.stringValue);
             _property.serializedObject.ApplyModifiedProperties();
         }
     }
 }