private void AddDefaultPresetsToLibrary(PresetLibrary presetLibrary)
{
CurvePresetLibrary curvePresetLibrary = presetLibrary as CurvePresetLibrary;
if (curvePresetLibrary == null)
{
Debug.Log("Incorrect preset library, should be a CurvePresetLibrary but was a " + presetLibrary.GetType());
return;
}
foreach (AnimationCurve current in new List <AnimationCurve>
{
new AnimationCurve(CurveEditorWindow.GetConstantKeys(1f)),
new AnimationCurve(CurveEditorWindow.GetLinearKeys()),
new AnimationCurve(CurveEditorWindow.GetEaseInKeys()),
new AnimationCurve(CurveEditorWindow.GetEaseOutKeys()),
new AnimationCurve(CurveEditorWindow.GetEaseInOutKeys())
})
{
curvePresetLibrary.Add(current, string.Empty);
}
}