Hi,
I was going to take some screenshots, but I was stopped by another problem, which I’ll document here and then in the next post show an example of a property not updating.
So here, I have a Label inside of a VisualElement called #title, inside #popupFrame. This is the title bar in Game view in the bottom right.
When I select this label, no parameters are printed, and I instead get the exception pasted below.
And here’s the CSS:
Exception:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.UIElements.Debugger.MatchedRulesExtractor.<FindStyleSheets>g__RecursivePrintStyleSheetNames|4_0 (UnityEngine.UIElements.StyleSheet importedSheet, UnityEditor.UIElements.Debugger.MatchedRulesExtractor+<>c__DisplayClass4_0& , UnityEditor.UIElements.Debugger.MatchedRulesExtractor+<>c__DisplayClass4_1& ) (at <40f9e047597246a5ab2827da20f34a52>:0)
UnityEditor.UIElements.Debugger.MatchedRulesExtractor.<FindStyleSheets>g__RecursivePrintStyleSheetNames|4_0 (UnityEngine.UIElements.StyleSheet importedSheet, UnityEditor.UIElements.Debugger.MatchedRulesExtractor+<>c__DisplayClass4_0& , UnityEditor.UIElements.Debugger.MatchedRulesExtractor+<>c__DisplayClass4_1& ) (at <40f9e047597246a5ab2827da20f34a52>:0)
UnityEditor.UIElements.Debugger.MatchedRulesExtractor.FindStyleSheets (UnityEngine.UIElements.VisualElement cursor, UnityEngine.UIElements.StyleMatchingContext matchingContext) (at <40f9e047597246a5ab2827da20f34a52>:0)
UnityEditor.UIElements.Debugger.MatchedRulesExtractor.FindStyleSheets (UnityEngine.UIElements.VisualElement cursor, UnityEngine.UIElements.StyleMatchingContext matchingContext) (at <40f9e047597246a5ab2827da20f34a52>:0)
UnityEditor.UIElements.Debugger.MatchedRulesExtractor.FindStyleSheets (UnityEngine.UIElements.VisualElement cursor, UnityEngine.UIElements.StyleMatchingContext matchingContext) (at <40f9e047597246a5ab2827da20f34a52>:0)
UnityEditor.UIElements.Debugger.MatchedRulesExtractor.FindStyleSheets (UnityEngine.UIElements.VisualElement cursor, UnityEngine.UIElements.StyleMatchingContext matchingContext) (at <40f9e047597246a5ab2827da20f34a52>:0)
UnityEditor.UIElements.Debugger.MatchedRulesExtractor.FindStyleSheets (UnityEngine.UIElements.VisualElement cursor, UnityEngine.UIElements.StyleMatchingContext matchingContext) (at <40f9e047597246a5ab2827da20f34a52>:0)
UnityEditor.UIElements.Debugger.MatchedRulesExtractor.FindStyleSheets (UnityEngine.UIElements.VisualElement cursor, UnityEngine.UIElements.StyleMatchingContext matchingContext) (at <40f9e047597246a5ab2827da20f34a52>:0)
UnityEditor.UIElements.Debugger.MatchedRulesExtractor.FindStyleSheets (UnityEngine.UIElements.VisualElement cursor, UnityEngine.UIElements.StyleMatchingContext matchingContext) (at <40f9e047597246a5ab2827da20f34a52>:0)
UnityEditor.UIElements.Debugger.MatchedRulesExtractor.FindMatchingRules (UnityEngine.UIElements.VisualElement target) (at <40f9e047597246a5ab2827da20f34a52>:0)
UnityEditor.UIElements.Debugger.StylesDebugger.GetElementMatchers () (at <40f9e047597246a5ab2827da20f34a52>:0)
UnityEditor.UIElements.Debugger.StylesDebugger.set_selectedElement (UnityEngine.UIElements.VisualElement value) (at <40f9e047597246a5ab2827da20f34a52>:0)
UnityEditor.UIElements.Debugger.StylesDebugger.<.ctor>b__9_1 (UnityEngine.UIElements.VisualElement element) (at <40f9e047597246a5ab2827da20f34a52>:0)
UnityEditor.UIElements.Debugger.DebuggerSelection.set_element (UnityEngine.UIElements.VisualElement value) (at <40f9e047597246a5ab2827da20f34a52>:0)
UnityEditor.UIElements.Debugger.UIElementsDebuggerImpl.SelectElement (UnityEngine.UIElements.VisualElement ve) (at <40f9e047597246a5ab2827da20f34a52>:0)
UnityEditor.UIElements.Debugger.DebuggerTreeView.<RebuildTree>b__24_1 (System.Collections.Generic.IEnumerable`1[T] items) (at <40f9e047597246a5ab2827da20f34a52>:0)
UnityEngine.UIElements.InternalTreeView.OnSelectionChange (System.Collections.Generic.IEnumerable`1[T] selectedListItems) (at <7a35ce877df342ebba23a623ded66776>:0)
UnityEngine.UIElements.BaseVerticalCollectionView.NotifyOfSelectionChange () (at <7a35ce877df342ebba23a623ded66776>:0)
UnityEngine.UIElements.BaseVerticalCollectionView.SetSelectionInternal (System.Collections.Generic.IEnumerable`1[T] indices, System.Boolean sendNotification) (at <7a35ce877df342ebba23a623ded66776>:0)
UnityEngine.UIElements.BaseVerticalCollectionView.SetSelection (System.Collections.Generic.IEnumerable`1[T] indices) (at <7a35ce877df342ebba23a623ded66776>:0)
UnityEngine.UIElements.BaseVerticalCollectionView.SetSelection (System.Int32 index) (at <7a35ce877df342ebba23a623ded66776>:0)
UnityEngine.UIElements.BaseVerticalCollectionView.DoSelect (UnityEngine.Vector2 localPosition, System.Int32 clickCount, System.Boolean actionKey, System.Boolean shiftKey) (at <7a35ce877df342ebba23a623ded66776>:0)
UnityEngine.UIElements.BaseVerticalCollectionView.ProcessPointerDown (UnityEngine.UIElements.IPointerEvent evt) (at <7a35ce877df342ebba23a623ded66776>:0)
UnityEngine.UIElements.BaseVerticalCollectionView.OnPointerDown (UnityEngine.UIElements.PointerDownEvent evt) (at <7a35ce877df342ebba23a623ded66776>:0)
UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.PropagationPhase propagationPhase) (at <7a35ce877df342ebba23a623ded66776>:0)
UnityEngine.UIElements.EventCallbackRegistry.InvokeCallbacks (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.PropagationPhase propagationPhase) (at <7a35ce877df342ebba23a623ded66776>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <7a35ce877df342ebba23a623ded66776>:0)
UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at <7a35ce877df342ebba23a623ded66776>:0)
UnityEngine.UIElements.PointerEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt) (at <7a35ce877df342ebba23a623ded66776>:0)
UnityEngine.UIElements.PointerEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <7a35ce877df342ebba23a623ded66776>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <7a35ce877df342ebba23a623ded66776>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <7a35ce877df342ebba23a623ded66776>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <7a35ce877df342ebba23a623ded66776>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <7a35ce877df342ebba23a623ded66776>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <7a35ce877df342ebba23a623ded66776>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <7a35ce877df342ebba23a623ded66776>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <7a35ce877df342ebba23a623ded66776>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <7a35ce877df342ebba23a623ded66776>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <ae7f5af45fd74d6f8ef88ea586136af6>:0)