public override void ResampleAnimation()
 {
     if (!this.state.disabled)
     {
         if (this.previewing)
         {
             if (this.canPreview)
             {
                 if (this.state.activeAnimationClip != null)
                 {
                     AnimationMode.BeginSampling();
                     Undo.FlushUndoRecordObjects();
                     AnimationMode.SampleAnimationClip(this.state.activeRootGameObject, this.state.activeAnimationClip, this.time.time);
                     if (this.m_CandidateClip != null)
                     {
                         AnimationMode.SampleCandidateClip(this.state.activeRootGameObject, this.m_CandidateClip, 0f);
                     }
                     AnimationMode.EndSampling();
                     SceneView.RepaintAll();
                     InspectorWindow.RepaintAllInspectors();
                     ParticleSystemWindow instance = ParticleSystemWindow.GetInstance();
                     if (instance)
                     {
                         instance.Repaint();
                     }
                 }
             }
         }
     }
 }
 public override void ResampleAnimation()
 {
     if (!this.state.disabled)
     {
         if (this.previewing)
         {
             if (this.canPreview)
             {
                 bool flag = false;
                 AnimationMode.BeginSampling();
                 AnimationWindowSelectionItem[] array = this.state.selection.ToArray();
                 for (int i = 0; i < array.Length; i++)
                 {
                     AnimationWindowSelectionItem animationWindowSelectionItem = array[i];
                     if (animationWindowSelectionItem.animationClip != null)
                     {
                         Undo.FlushUndoRecordObjects();
                         AnimationMode.SampleAnimationClip(animationWindowSelectionItem.rootGameObject, animationWindowSelectionItem.animationClip, this.time.time - animationWindowSelectionItem.timeOffset);
                         if (this.m_CandidateClip != null)
                         {
                             AnimationMode.SampleCandidateClip(animationWindowSelectionItem.rootGameObject, this.m_CandidateClip, 0f);
                         }
                         flag = true;
                     }
                 }
                 AnimationMode.EndSampling();
                 if (flag)
                 {
                     SceneView.RepaintAll();
                     InspectorWindow.RepaintAllInspectors();
                     ParticleSystemWindow instance = ParticleSystemWindow.GetInstance();
                     if (instance)
                     {
                         instance.Repaint();
                     }
                 }
             }
         }
     }
 }