Property Drawer on Extended Class

I’m having trouble getting a property drawer to draw an extended class, the setup is something like this;

[System.Serializable]
public class Animal {}

[System.Serializable]
public class Dog : Animal {
    public float woofVolume;
}

The class that uses the Dog/Animal class;

public class Kennel : MonoBehaviour {
    public Animal animal = new Dog();
}

And the property drawer;

[CustomPropertyDrawer(typeof(Dog))]
public  class DogDrawer : PropertyDrawer {
    public override void OnGUI (Rect position,
                                SerializedProperty property,
                                GUIContent label)
    {
        EditorGUI.BeginProperty (position, label, property);
        GUI.Button(position, "Woof");
        EditorGUI.EndProperty ();
    }
}

So basically I want the inspector to display the property drawer for Dog when the animal property of kennel is a Dog, if I had a Cat and the appropriate Drawer for a Cat I would want the inspector to use the PropertyDrawer for Cat. Is this achievable with the property drawer system? Currently I can only get it to draw if I make property drawer use typeof(Animal)

For my case I can work around this with a switch but its not the dynamic scalable solution i wanted, still would like to know if theres a solution

Does your dog’s woofVolume actually get serialized and deserialized properly? I was under the impression that using a subclass in a serializeable field like that will only deserialize as the super class.

You are missing an argument

  [CustomPropertyDrawer(typeof(Animal), useForChildren: true)]

cheers,