Hi there
I get this long error (NullReferenceException: Object reference not set to an instance of an object
UnityEditor.EditorWindow.RefreshStylesAfterExternalEvent () ) whenever I record an animation.
It comes up twice at the beginning and the end of the recording, but it’s a long script, so I don’t know where it went wrong. Can you please help me?
+version: unity 2019.4.6f1
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.EditorWindow.RefreshStylesAfterExternalEvent () (at <47ddc45fb441488ba3df69fab6753def>:0)
UnityEditor.AnimationMode.StartAnimationRecording () (at <47ddc45fb441488ba3df69fab6753def>:0)
UnityEditorInternal.AnimationWindowControl.StartRecording () (at <47ddc45fb441488ba3df69fab6753def>:0)
UnityEditorInternal.AnimationWindowControl.StartRecording (UnityEngine.Object targetObject) (at <47ddc45fb441488ba3df69fab6753def>:0)
UnityEditorInternal.AnimationWindowState.StartRecording () (at <47ddc45fb441488ba3df69fab6753def>:0)
UnityEditor.AnimEditor.RecordButtonOnGUI () (at <47ddc45fb441488ba3df69fab6753def>:0)
UnityEditor.AnimEditor.PlayControlsOnGUI () (at <47ddc45fb441488ba3df69fab6753def>:0)
UnityEditor.AnimEditor.OnAnimEditorGUI (UnityEditor.EditorWindow parent, UnityEngine.Rect position) (at <47ddc45fb441488ba3df69fab6753def>:0)
UnityEditor.AnimationWindow.OnGUI () (at <47ddc45fb441488ba3df69fab6753def>:0)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <fb001e01371b4adca20013e0ac763896>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <fb001e01371b4adca20013e0ac763896>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <fb001e01371b4adca20013e0ac763896>:0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at <47ddc45fb441488ba3df69fab6753def>:0)
UnityEditor.HostView.Invoke (System.String methodName) (at <47ddc45fb441488ba3df69fab6753def>:0)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <47ddc45fb441488ba3df69fab6753def>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <47ddc45fb441488ba3df69fab6753def>:0)
UnityEditor.DockArea.OldOnGUI () (at <47ddc45fb441488ba3df69fab6753def>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <dbdcd4f36a83440ea93f74c069708676>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <dbdcd4f36a83440ea93f74c069708676>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <dbdcd4f36a83440ea93f74c069708676>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <dbdcd4f36a83440ea93f74c069708676>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus) (at <dbdcd4f36a83440ea93f74c069708676>:0)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <dbdcd4f36a83440ea93f74c069708676>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <dbdcd4f36a83440ea93f74c069708676>:0)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <dbdcd4f36a83440ea93f74c069708676>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <dbdcd4f36a83440ea93f74c069708676>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <dbdcd4f36a83440ea93f74c069708676>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <dbdcd4f36a83440ea93f74c069708676>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <dbdcd4f36a83440ea93f74c069708676>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <dbdcd4f36a83440ea93f74c069708676>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <dbdcd4f36a83440ea93f74c069708676>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <dbdcd4f36a83440ea93f74c069708676>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <dbdcd4f36a83440ea93f74c069708676>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <dbdcd4f36a83440ea93f74c069708676>:0)
UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <dbdcd4f36a83440ea93f74c069708676>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <819de1aa368e45faa4f78e26c97c62b0>:0)
