Serializing a Function in Unity using AnimationCurve - C#