using KitsuneCafe.Sys; using UnityEditor; using UnityEditor.UIElements; using UnityEngine.UIElements; namespace KitsuneCafe.Editor.PropertyDrawers { public class AccelerationField : VisualElement { public AccelerationField(string label) { var duration = new FloatField(); var curve = new CurveField(); Add(duration); Add(curve); } } [CustomPropertyDrawer(typeof(Acceleration))] public class AccelerationPropertyDrawer : PropertyDrawer { public override VisualElement CreatePropertyGUI(SerializedProperty property) { return new AccelerationField(ObjectNames.NicifyVariableName(property.name)); } } }