| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 | using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using UnityEngine;namespace Bitsplash.DatePicker{    public partial class DatePickerSettings : MonoBehaviour    {        [SerializeField]        private Font textFont;        /// <summary>        /// the text font used for UI.Text         /// </summary>        public Font TextFont        {            get { return textFont; }            set            {                textFont = value;                if (TextTypeChanged != null)                    TextTypeChanged();            }        }        public event Action TextTypeChanged;        DatePickerContent mContent = null;        /// <summary>        /// the datepicker content object for this date picker.         /// </summary>        public DatePickerContent Content        {            get            {                if (mContent == null)                {                    var contents = GetComponentsInChildren<DatePickerContent>();                    if (contents.Length == 0)                        Debug.LogError("A DatePickerSettings behaviour must parent a DatePickerContent behaviour in a child GameObject");                    else                        if (contents.Length > 1)                        Debug.LogError("A DatePickerSettings behaviout may only have one child DatePickerContent behaviour ");                    else                        mContent = contents[0];                }                return mContent;            }        }        private void Start()        {        }        private void OnValidate()        {            foreach (var elem in GetComponentsInChildren<DatePickerElement>())            {                elem.OnValidate();            }        }    }}
 |