// Callback when the mixin/mixout properties are clicked on void OnMixCurveSelected(string title, CurvePresetLibrary library, SerializedProperty curveSelected, bool easeIn) { m_CurvePresets = library; m_PreviewCurves = new[] { curveSelected.animationCurveValue }; m_ClipCurveEditor.headerString = title; m_ClipCurveEditor.SetCurves(m_PreviewCurves, null); m_ClipCurveEditor.SetSelected(curveSelected.animationCurveValue); if (easeIn) { m_ClipCurveEditor.SetUpdateCurveCallback(MixInCurveUpdated); } else { m_ClipCurveEditor.SetUpdateCurveCallback(MixOutCurveUpdated); } Repaint(); }
// Callback when the mixin/mixout properties are clicked on void OnMixCurveSelected(string title, CurvePresetLibrary library, SerializedProperty curveSelected, bool easeIn) { m_PreviewCurveState = easeIn ? PreviewCurveState.MixIn : PreviewCurveState.MixOut; m_CurvePresets = library; var animationCurve = curveSelected.animationCurveValue; m_ClipCurveEditor.headerString = title; m_ClipCurveEditor.SetCurve(animationCurve); m_ClipCurveEditor.SetSelected(animationCurve); if (easeIn) { m_ClipCurveEditor.SetUpdateCurveCallback(MixInCurveUpdated); } else { m_ClipCurveEditor.SetUpdateCurveCallback(MixOutCurveUpdated); } Repaint(); }