Search Issue Tracker

Fixed

Unknown (hidden) 2021.3.X, 2022.1.X, 2022.2.X

Fixed in 2023.1.0a5

Votes

0

Found in

2021.3.3f1

2022.1.3f1

2022.2.0a13

Issue ID

UUM-1438

Regression

No

Animation Window undo error in rec mode after preview offset

--

-

Getting an InvalidOperationException error after the following operations in the Animation window.

This can be reproduced with a single cube and two keys.

repro:
- create a cube with 2 keys moving the cube over time in the Animation window
or
- open attached project and test scene, open the Animation window and select cube in the scene
- scrub the animation window time ruler to activate Preview mode and set current time half way through the animation
- now offset the cube in the scene window, more than once
- now immediately click the red button to set the Animation window into record mode...
- Ctrl-Z (CMD-Z) to Undo the operation...
bug: error in the console

see arrached gif

Alternative repro:
- scrub the animation window time ruler to activate Preview mode and set current time half way through the animation
- now offset the cube in the scene window once
- RMB-Click on the animated property in the Inspector and select Add key
- Ctrl-Z (CMD-Z) to Undo the operation...

InvalidOperationException: AnimationMode.AddCandidates may only be called when recording candidates. See AnimationMode.StartCandidateRecording.
UnityEditorInternal.AnimationWindowControl.ResampleAnimation (UnityEditorInternal.AnimationWindowControl+ResampleFlags flags) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimationWindowControl.cs:686)
UnityEditorInternal.AnimationWindowControl.ResampleAnimation () (at /Users/bokken/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimationWindowControl.cs:628)
UnityEditorInternal.AnimationWindowState.UndoRedoPerformed () (at /Users/bokken/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimationWindowState.cs:432)
UnityEditor.Undo.Internal_CallUndoRedoPerformed () (at /Users/bokken/buildslave/unity/build/Editor/Mono/Undo/Undo.bindings.cs:237)
UnityEditor.EditorApplication:Internal_CallGlobalEventHandler() (at /Users/bokken/buildslave/unity/build/Editor/Mono/EditorApplication.cs:428)

this bug is present in all versions back to at least 2019.4 and current 2021.2

  1. Resolution Note (fix version 2023.1.0a5):

    Animation: Fixed AnimationWindow throwing InvalidOperationException in some cases after performing Undo

  2. Resolution Note (2022.2.X):

    internally reported low priority bug, no backport required

  3. Resolution Note (2022.1.X):

    internally reported low priority bug, no backport required

  4. Resolution Note (2021.3.X):

    internally reported low priority bug, no backport required

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.