using System; using UnityEngine; namespace EditorAttributes { public enum TimeFormat { YearMonthWeek, YearMonthDay, WeekDayHour, DayHourMinute, HourMinuteSecond } /// /// Attribute to display a numerical field as a specified time format and convert it to a single value /// [Obsolete("The TimeField Attribute has been deprecated and it will be removed in the next version. Use UnitField instead.")] public class TimeFieldAttribute : PropertyAttribute { public TimeFormat TimeFormat { get; private set; } public Unit ConversionUnit { get; private set; } /// /// Attribute to display a numerical field as a specified time format and convert it to a single value /// /// The format in which to display the time /// The time unit to convert to public TimeFieldAttribute(TimeFormat timeFormat, Unit conversionUnit) { ConversionUnit = conversionUnit; TimeFormat = timeFormat; } } }