UnityEditor.AnimationClipEditor.OnEnable C# (CSharp) Method

OnEnable() private method

private OnEnable ( ) : void
return void
        private void OnEnable()
        {
            if (styles == null)
            {
                styles = new Styles();
            }
            this.m_Clip = this.target as AnimationClip;
            if (this.m_TimeArea == null)
            {
                this.m_TimeArea = new TimeArea(true);
                this.m_TimeArea.hRangeLocked = false;
                this.m_TimeArea.vRangeLocked = true;
                this.m_TimeArea.hSlider = true;
                this.m_TimeArea.vSlider = false;
                this.m_TimeArea.hRangeMin = this.m_Clip.startTime;
                this.m_TimeArea.hRangeMax = this.m_Clip.stopTime;
                this.m_TimeArea.margin = 10f;
                this.m_TimeArea.scaleWithWindow = true;
                this.m_TimeArea.SetShownHRangeInsideMargins(this.m_Clip.startTime, this.m_Clip.stopTime);
                this.m_TimeArea.hTicks.SetTickModulosForFrameRate(this.m_Clip.frameRate);
                this.m_TimeArea.ignoreScrollWheelUntilClicked = true;
            }
            if (this.m_EventTimeArea == null)
            {
                this.m_EventTimeArea = new TimeArea(true);
                this.m_EventTimeArea.hRangeLocked = true;
                this.m_EventTimeArea.vRangeLocked = true;
                this.m_EventTimeArea.hSlider = false;
                this.m_EventTimeArea.vSlider = false;
                this.m_EventTimeArea.hRangeMin = 0f;
                this.m_EventTimeArea.hRangeMax = s_EventTimelineMax;
                this.m_EventTimeArea.margin = 10f;
                this.m_EventTimeArea.scaleWithWindow = true;
                this.m_EventTimeArea.SetShownHRangeInsideMargins(0f, s_EventTimelineMax);
                this.m_EventTimeArea.hTicks.SetTickModulosForFrameRate(60f);
                this.m_EventTimeArea.ignoreScrollWheelUntilClicked = true;
            }
            if (this.m_EventManipulationHandler == null)
            {
                this.m_EventManipulationHandler = new EventManipulationHandler(this.m_EventTimeArea);
            }
        }