今天特效小老弟来问了我个问题,他在做动画时发生了这么个错误:
报错内容大概如下
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.EditorWindow.RefreshStylesAfterExternalEvent () (at <c0de89915f6a4891b589a4b2bdff444d>:0)
UnityEditor.AnimationMode.StartAnimationRecording () (at <c0de89915f6a4891b589a4b2bdff444d>:0)
UnityEditor.Timeline.WindowState.set_recording (System.Boolean value) (at Library/PackageCache/com.unity.timeline@1.2.17/Editor/State/WindowState.cs:215)
UnityEditor.Timeline.WindowState.ArmForRecord (UnityEngine.Timeline.TrackAsset track) (at Library/PackageCache/com.unity.timeline@1.2.17/Editor/State/WindowState.cs:868)........(后面太长不贴了)
解决办法就是把窗口布局恢复默认,就可以了,不过好像后续你又自定义布局的话这个bug还会出现,不知道为什么
感谢这位老哥