- Home /
Question by
Jung_Gang · May 02, 2018 at 10:01 AM ·
animationanimationclipanimationcurve
SetEditorCurve() makes animation file too large.
I made a tool to modify some curve tangents in unity.
AnimationUtility.SetKeyLeftTangentMode(curve, i, AnimationUtility.TangentMode.Constant);
AnimationUtility.SetKeyRightTangentMode(curve, i, AnimationUtility.TangentMode.Constant);
AnimationUtility.SetEditorCurve(clip, binding, curve);
It worked like a charm.. but my animation file gets too large.
I checked .anim file in text editor, and found out that a lot of new lines were added inside "m_EditorCurves" array.
I can manually delete these lines.. (it works fine without these data) but it's too cumbersome..
Is there way to delete these lines by script? (I tried to use SerializedObject.FindProperty("m_EditorCurves").ClearArray(), but it was way too slow)
Or is it possible to change curve tangents without adding these lines?
Thank you in advance .
Comment