mgear
September 16, 2016, 8:59am
1
tried to create sprite anim, by drag dropping sprites from project window to Animation window…but error comes up:
ArgumentNullException: Argument cannot be null.
Parameter name: Object registered for Undo cannot be null.
UnityEditor.Undo.RegisterCompleteObjectUndo (UnityEngine.Object objectToUndo, System.String name) (at C:/buildslave/unity/build/artifacts/generated/common/editor/UndoBindings.gen.cs:45)
UnityEditorInternal.AnimationWindowState.SaveKeySelection (System.String undoLabel) (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimationWindowState.cs:415)
UnityEditorInternal.DopeSheetEditor.PerformDragAndDrop (UnityEditorInternal.AnimationWindowCurve targetCurve, Single time) (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/DopeSheetEditor.cs:1315)
UnityEditorInternal.DopeSheetEditor.DoSpriteDropAfterGeneratingNewDopeline (UnityEngine.AnimationClip animationClip, Nullable`1 spriteBinding) (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/DopeSheetEditor.cs:904)
UnityEditorInternal.DopeSheetEditor.HandleDragAndDropToEmptyArea () (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/DopeSheetEditor.cs:877)
UnityEditorInternal.DopeSheetEditor.OnGUI (Rect position, Vector2 scrollPosition) (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/DopeSheetEditor.cs:319)
UnityEditor.AnimEditor.DopeSheetOnGUI (Rect position) (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimEditor.cs:533)
UnityEditor.AnimEditor.MainContentOnGUI (Rect contentLayoutRect) (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimEditor.cs:220)
UnityEditor.AnimEditor.OnAnimEditorGUI (UnityEditor.EditorWindow parent, Rect position) (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimEditor.cs:177)
UnityEditor.AnimationWindow.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimationWindow.cs:76)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
1 Like
Hi mgear,
We are aware of the issue and already have a fix internally. It should be available in an upcoming beta.
Issue Tracker: Unity Issue Tracker - AnimationWindow: ArgumentNullException in Curves tab
In the meantime, as a workaround, try doing another operation (eg. moving a keyframe and undoing). This will initialize the missing undo data structure and should allow you to drag&drop sprites in the animation window afterwards.
Hope this helps!
1 Like