using System;
using UnityEditor;
using UnityEngine;

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

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

    public void Destroy()
    {
    }
}