Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug (Case 1285611) UI Toolkit package breaks Shortcuts

Discussion in 'UI Toolkit' started by Refeas, Oct 6, 2020.

  1. Refeas

    Refeas

    Joined:
    Nov 8, 2016
    Posts:
    192
    Having the new preview UI Toolkit package in the project breaks Shortcuts management in Unity. Just opening the window spams console with this error:
    Code (CSharp):
    1. MissingMethodException: UnityEngine.UIElements.StyleLength UnityEngine.UIElements.ComputedStyle.get_paddingLeft()
    2. UnityEditor.ShortcutManagement.HorizontalColumnDragger.UpdateElements (System.Single handlePosition) (at <67055f1be3654e2a987254d5437ee5b8>:0)
    3. UnityEditor.ShortcutManagement.HorizontalColumnDragger.UpdatePositions () (at <67055f1be3654e2a987254d5437ee5b8>:0)
    4. UnityEditor.ShortcutManagement.ShortcutManagerWindowView.ShortcutTableGeometryChanged (UnityEngine.UIElements.GeometryChangedEvent evt) (at <67055f1be3654e2a987254d5437ee5b8>:0)
    5. UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt) (at Library/PackageCache/com.unity.ui@1.0.0-preview.9/Core/Events/EventCallback.cs:64)
    6. UnityEngine.UIElements.EventCallbackRegistry.InvokeCallbacks (UnityEngine.UIElements.EventBase evt) (at Library/PackageCache/com.unity.ui@1.0.0-preview.9/Core/Events/EventCallbackRegistry.cs:341)
    7. UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at Library/PackageCache/com.unity.ui@1.0.0-preview.9/Core/Events/EventHandler.cs:147)
    8. UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at Library/PackageCache/com.unity.ui@1.0.0-preview.9/Core/Events/EventHandler.cs:125)
    9. UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at Library/PackageCache/com.unity.ui@1.0.0-preview.9/Core/Events/IEventDispatchingStrategy.cs:74)
    10. UnityEngine.UIElements.DefaultDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.9/Core/Events/DefaultDispatchingStrategy.cs:15)
    11. UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at Library/PackageCache/com.unity.ui@1.0.0-preview.9/Core/EventDispatcher.cs:373)
    12. UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.9/Core/EventDispatcher.cs:336)
    13. UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at Library/PackageCache/com.unity.ui@1.0.0-preview.9/Core/EventDispatcher.cs:299)
    14. UnityEngine.UIElements.EventDispatcher.OpenGate () (at Library/PackageCache/com.unity.ui@1.0.0-preview.9/Core/EventDispatcher.cs:264)
    15. UnityEngine.UIElements.EventDispatcherGate.Dispose () (at Library/PackageCache/com.unity.ui@1.0.0-preview.9/Core/EventDispatcher.cs:75)
    16. UnityEngine.UIElements.UIRLayoutUpdater.Update () (at Library/PackageCache/com.unity.ui@1.0.0-preview.9/Core/Renderer/UIRLayoutUpdater.cs:56)
    17. UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at Library/PackageCache/com.unity.ui@1.0.0-preview.9/Core/VisualTreeUpdater.cs:154)
    18. UnityEngine.UIElements.Panel.ValidateLayout () (at Library/PackageCache/com.unity.ui@1.0.0-preview.9/Core/Panel.cs:903)
    19. UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.9/Core/UIElementsUtility.cs:457)
    20. UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at Library/PackageCache/com.unity.ui@1.0.0-preview.9/Core/UIElementsUtility.cs:209)
    21. UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at Library/PackageCache/com.unity.ui@1.0.0-preview.9/Core/UIElementsUtility.cs:74)
    22. UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at Library/PackageCache/com.unity.ui@1.0.0-preview.9/Core/UIElementsUtility.cs:28)
    23. UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <2500dd078a544a69b6c923861af6cd15>:0)
    24.  
    Clicking any shortcut to change it also spams a bunch of these errors and does not work at all. Happens in 2020.1.6 and the latest package, haven't tried other combinations.
     
  2. Refeas

    Refeas

    Joined:
    Nov 8, 2016
    Posts:
    192
    Shortcuts are pretty important basic feature and it would be great if anyone from Unity could take a look at this.
     
    SudoCat likes this.
  3. Refeas

    Refeas

    Joined:
    Nov 8, 2016
    Posts:
    192
    Reported as case 1285611.