public void FinializeTrack(TrackAsset track, TimelineWindow.TimelineState state) { AnimationTrack animationTrack = track as AnimationTrack; if (!animationTrack.inClipMode) { EditorUtility.SetDirty(animationTrack.GetOrCreateClip()); } if (this.recordClip != null) { if (!this.m_ProcessedClips.Contains(this.recordClip.animationClip)) { this.m_ProcessedClips.Add(this.recordClip.animationClip); } if (this.m_ClipTime > this.recordClip.duration) { TimelineUndo.PushUndo(track, "Add Key"); this.recordClip.duration = this.m_ClipTime; this.m_RefreshState = true; } track.CalculateExtrapolationTimes(); } this.recordClip = null; this.m_ClipTime = 0.0; if (this.m_needRebuildRects) { state.CalculateRowRects(); this.m_needRebuildRects = false; } }