private void SynchronizePolicy() { if (!(this.m_AnimEditor == null)) { if (this.m_Policy == null) { this.m_Policy = new AnimationWindowPolicy(); } if (this.m_Policy.unitialized) { this.m_Policy.SynchronizeFrameRate = delegate(ref float frameRate) { AnimationWindowSelectionItem selectedItem = this.m_AnimEditor.selectedItem; if (selectedItem != null && selectedItem.animationClip != null) { frameRate = selectedItem.animationClip.frameRate; } else { frameRate = 60f; } return(true); }; this.m_Policy.unitialized = false; } this.m_AnimEditor.policy = this.m_Policy; } }
private void SynchronizePolicy() { if (this.m_AnimEditor == null) { return; } if (this.m_Policy == null) { this.m_Policy = new AnimationWindowPolicy(); this.m_Policy.allowRecording = true; } if (this.m_Policy.unitialized) { this.m_Policy.SynchronizeFrameRate = delegate(ref float frameRate, ref bool timeInFrames) { AnimationWindowSelectionItem selectedItem = this.m_AnimEditor.selectedItem; if (selectedItem != null && selectedItem.animationClip != null) { frameRate = selectedItem.animationClip.frameRate; } else { frameRate = 60f; } timeInFrames = false; return(true); }; this.m_Policy.unitialized = false; } this.m_AnimEditor.policy = this.m_Policy; }