using System;
using UnityEditor;
using UnityEngine;

[TypeDrawer]
public class AnimationCurveTypeDrawer : ITypeDrawer
{
    public bool HandlesType(Type type, object value)
    {
        return type == typeof(AnimationCurve);
    }

    public object DrawAndGetNewValue(Type memberType, string memberName, object value, object target)
    {
        return EditorGUILayout.CurveField(memberName, (AnimationCurve)value);
    }

    public void Destroy()
    {
    }
}