问题描述
当我启动Unity时,控制台会打印6次相同的错误消息:这是一个Null Reference Exeption,但是当我清空控制台并启动游戏时,一切正常,没有任何问题。仅当我重新启动Unity时,它在项目上也不会再次出现。我该如何解决?还是那很正常? 异常堆栈跟踪:
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.UIElements.StyleSheets.StyleSelectorHelper.FastLookup (System.Collections.Generic.IDictionary`2[TKey,TValue] table,System.Collections.Generic.List`1[T] matchedSelectors,UnityEngine.UIElements.StyleMatchingContext context,System.String input,UnityEngine.UIElements.StyleSheets.SelectorMatchRecord& record) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.StyleSheets.StyleSelectorHelper.FindMatches (UnityEngine.UIElements.StyleMatchingContext context,System.Collections.Generic.List`1[T] matchedSelectors) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.VisualTreeStyleUpdaterTraversal.TraverseRecursive (UnityEngine.UIElements.VisualElement element,System.Int32 depth) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.StyleSheets.HierarchyTraversal.Traverse (UnityEngine.UIElements.VisualElement element) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.VisualTreeStyleUpdater.ApplyStyles () (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.VisualTreeStyleUpdater.Update () (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.Panel.UpdateForRepaint () (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID,System.IntPtr nativeEventPtr,System.Boolean& eventHandled) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID,System.IntPtr nativeEventPtr) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i,System.IntPtr ptr) (at <e11cddb636f444f68eec62123764f018>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID,System.Boolean& result) (at <2500dd078a544a69b6c923861af6cd15>:0)
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)