using UnityEditor; namespace Module.Inspector.Editor { [CustomPropertyDrawer(typeof(LargerThanField))] internal sealed class DrawerLargerThanField : ValueModifierPropertyDrawer { public override void Modify(ValueModifierPropertyAttribute attribute, SerializedProperty property) { var att = (LargerThanField)attribute; SerializedPropertyExtension.ECompareType compareType = property.IsGreaterOrEqualToSiblingValue(att.fieldName); if (compareType == SerializedPropertyExtension.ECompareType.False) property.SetValueTo(property.GetSibling(att.fieldName)); } } }