private static void DuplicateLast(float currentTime, float frameRate, AnimationCurve curve)
{
if(curve.keys.Length < 1)
return;
int pos = curve.keys.Length - 1;
int addKey = curve.AddKey(currentTime - (.001f/frameRate), curve.keys[pos].value);
if(addKey == -1)
Debug.LogError("Something went wrong with adding duplicate keys!");
}