You can derive PropertyDrawer to create custom drawers. But default implementation for OnGUI(Rect position, SerializedProperty property, GUIContent label) will display no GUI implemented in the Unity inspector.
using UnityEngine;
using UnityEditor;
class MyDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) {
base.OnGUI(position, property, label);
}
}Remove base.OnGUI() :
using UnityEngine;
using UnityEditor;
class MyDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) {
// code your own OnGUI here, do not use base.OnGUI()
}
}A code fix is offered for this diagnostic to automatically apply this change.