Skip to content

Commit

Permalink
log instead of assert, cancels remaining import otherwise
Browse files Browse the repository at this point in the history
  • Loading branch information
hybridherbst committed Mar 16, 2021
1 parent 749c61c commit 4b67c57
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1101,8 +1101,10 @@ private static float GetCurveKeyframeLeftLinearSlope(Keyframe[] keyframes, int k
var valueDelta = keyframes[keyframeIndex].value - keyframes[keyframeIndex - 1].value;
var timeDelta = keyframes[keyframeIndex].time - keyframes[keyframeIndex - 1].time;

Debug.Assert(timeDelta > 0, "Unity does not allow you to put two keyframes in with the same time, so this should never occur.");

if(timeDelta <= 0) {
Debug.LogWarning("Unity does not allow you to put two keyframes in with the same time, so this should never occur.");
return 0;
}
return valueDelta / timeDelta;
}

Expand Down

0 comments on commit 4b67c57

Please sign in to comment.