using System;
using UnityEditor;
using UnityEngine;
[Serializable]
public class MyClass
{
}
[CustomPropertyDrawer(typeof(MyClass))]
public class MyClassDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
GUI.Label(position, label);
}
public MyClassDrawer() => Debug.Log("MyClassDrawer");
~MyClassDrawer() => Debug.Log("~MyClassDrawer");
}
public class Test : MonoBehaviour
{
public MyClass myClass = new MyClass();
}