Copyright © 2026 Unity Technologies
https://ono.unity3d.com/unity/unity/pull-request/145480/_/animation/fix-pptrcurve-keyframes
How to reproduce:
Expected results: No error in console. It should be possible to move key frame left/right.
Actual results: Unable to move key frames in Animation window and multiple errors are thrown in the Console window if trying to do so.
InvalidCastException: Specified cast is not valid. UnityEditorInternal.AnimationWindowKeyframe.ToKeyframe () (at <dcc76d87233943b9b3b3c6ef6c77cdbf>:0) UnityEditorInternal.AnimationWindowCurve.ToAnimationCurve () (at <dcc76d87233943b9b3b3c6ef6c77cdbf>:0) UnityEditorInternal.AnimationWindowUtility.CreateRendererForCurve (UnityEditorInternal.AnimationWindowCurve curve) (at <dcc76d87233943b9b3b3c6ef6c77cdbf>:0) UnityEditorInternal.AnimationWindowUtility.GetCurveWrapper (UnityEditorInternal.AnimationWindowCurve curve, UnityEngine.AnimationClip clip) (at <dcc76d87233943b9b3b3c6ef6c77cdbf>:0) UnityEditorInternal.AnimationWindowState.get_activeCurveWrappers () (at <dcc76d87233943b9b3b3c6ef6c77cdbf>:0) UnityEditor.AnimEditor.UpdateCurveEditorData () (at <dcc76d87233943b9b3b3c6ef6c77cdbf>:0) UnityEditor.AnimEditor.UpdateSelectedKeysToCurveEditor () (at <dcc76d87233943b9b3b3c6ef6c77cdbf>:0) UnityEditor.AnimEditor.SaveCurveEditorKeySelection () (at <dcc76d87233943b9b3b3c6ef6c77cdbf>:0)
Reproducible on: 2022.2.0a13, 2022.2.0a14, 2022.2.0a18, 2022.2.0a19
Not reproducible on: 2022.2.0a12
Notes: Tested on Win11
Issues you vote on will appear here