Search Unity

Bug When updateing to Unity 2020.2.3f1 UIToolkit throws compile errors

Discussion in 'UI Toolkit' started by manuelgoellnitz, Feb 4, 2021.

  1. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    397
    After upateing to Unity 2020.2.3f1 i get compile errors like this one:

    Library\PackageCache\com.unity.ui@1.0.0-preview.13\Text\Editor\TextSettingsImporter.cs(28,44): error CS0122: 'TextDelegates' is inaccessible due to its protection level
     
    Shinyclef and Nexer8 like this.
  2. Shinyclef

    Shinyclef

    Joined:
    Nov 20, 2013
    Posts:
    505
    Seconded.
    I got three.

    [CompilerError] 'TextDelegates' is inaccessible due to its protection level
    Compiler Error at Library\PackageCache\com.unity.ui@1.0.0-preview.13\Text\Editor\TextSettingsImporter.cs:28 column 44

    [CompilerError] 'TextDelegates' is inaccessible due to its protection level
    Compiler Error at Library\PackageCache\com.unity.ui@1.0.0-preview.13\Text\Editor\Delegates\TextDelegates.cs:13 column 36

    [CompilerError] 'TextDelegates' is inaccessible due to its protection level
    Compiler Error at Library\PackageCache\com.unity.ui@1.0.0-preview.13\Text\Editor\Delegates\TextDelegates.cs:15 column 36
     
  3. romaniwdbt

    romaniwdbt

    Joined:
    Aug 25, 2020
    Posts:
    1
    Thirded (?)
    I have the same as above
     
  4. Greexonn

    Greexonn

    Joined:
    Mar 10, 2020
    Posts:
    19
    +1 here
     
  5. Refeas

    Refeas

    Joined:
    Nov 8, 2016
    Posts:
    192
    Same here.
     
  6. shiena

    shiena

    Joined:
    May 19, 2017
    Posts:
    44
  7. AlexandreT-unity

    AlexandreT-unity

    Unity Technologies

    Joined:
    Feb 1, 2018
    Posts:
    375
    Sevented (?). We're on it, we are able to repro. Thanks for the report :)
     
    Greexonn and Nexer8 like this.
  8. AlexandreT-unity

    AlexandreT-unity

    Unity Technologies

    Joined:
    Feb 1, 2018
    Posts:
    375
    Here's a workaround in two parts:
    1. Reimport UIToolkit (Project Window -> Packages -> Right-click UI Toolkit -> Reimport)
    2. Update TextMeshPro to 3.0.3 (otherwise you will be spammed with warnings)
     
  9. Refeas

    Refeas

    Joined:
    Nov 8, 2016
    Posts:
    192
    Thanks! This worked for me once I realized I have to exit Safe Mode. You can't reimport scripts in Safe Mode for some reason.
     
    PrimalCoder and AlexandreT-unity like this.
  10. shiena

    shiena

    Joined:
    May 19, 2017
    Posts:
    44
    Thank you. The compilation error disappeared after reimporting the UIToolkit. But when I reopen the project, I get the error again.
     
    pt-paulrahme likes this.
  11. pt-paulrahme

    pt-paulrahme

    Joined:
    Apr 22, 2020
    Posts:
    3
    Thanks - same thing here. Reimported UIToolkit (and updated TextMeshPro) and it worked, until I closed and reopened the project again, now back into Safe Mode with the errors again.
     
  12. AlexandreT-unity

    AlexandreT-unity

    Unity Technologies

    Joined:
    Feb 1, 2018
    Posts:
    375
    Besides reimporting again, we don't have a better workaround. We're looking into releasing preview 14 faster as it may fix this issue, but it's not confirmed yet. Stay tuned.
     
  13. l33t_P4j33t

    l33t_P4j33t

    Joined:
    Jul 29, 2019
    Posts:
    232
    please, sooner the better
    uitoolkit is a fundamental part of the project
     
    M_R_M and pt-paulrahme like this.
  14. AlexandreT-unity

    AlexandreT-unity

    Unity Technologies

    Joined:
    Feb 1, 2018
    Posts:
    375
    FYI Preview 14 has been released and fixes this issue. You also need to update TextMeshPro to 3.0.3.
     
  15. shiena

    shiena

    Joined:
    May 19, 2017
    Posts:
    44
    After upgrading to UIToolkit 1.0.0-preview.14, I get an error when resizing the preview window in UIBuilder.
    • Unity2020.2.3f1
    • UIToolkit 1.0.0-preview.14
    • UIBuilder 1.0.0-preview.12
    Code (CSharp):
    1. MissingMethodException: UnityEngine.UIElements.StyleCursor UnityEngine.UIElements.ComputedStyle.get_cursor()
    2.   at Unity.UI.Builder.BuilderCanvas+Manipulator.OnMouseDown (UnityEngine.UIElements.MouseDownEvent e) [0x00018] in F:\UnityProjects\UIToolkitRuntimeUISampler\Library\PackageCache\com.unity.ui.builder@1.0.0-preview.12\Editor\Builder\Viewport\BuilderCanvas.cs:424
    3.   at UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt) [0x00034] in F:\UnityProjects\UIToolkitRuntimeUISampler\Library\PackageCache\com.unity.ui@1.0.0-preview.14\Core\Events\EventCallback.cs:64
    4.   at UnityEngine.UIElements.EventCallbackRegistry.InvokeCallbacks (UnityEngine.UIElements.EventBase evt) [0x00023] in F:\UnityProjects\UIToolkitRuntimeUISampler\Library\PackageCache\com.unity.ui@1.0.0-preview.14\Core\Events\EventCallbackRegistry.cs:341
    5.   at UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) [0x00030] in F:\UnityProjects\UIToolkitRuntimeUISampler\Library\PackageCache\com.unity.ui@1.0.0-preview.14\Core\Events\EventHandler.cs:147
    6.   at UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) [0x001c0] in F:\UnityProjects\UIToolkitRuntimeUISampler\Library\PackageCache\com.unity.ui@1.0.0-preview.14\Core\Events\IEventDispatchingStrategy.cs:147
    7.   at UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToRegularTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) [0x0000a] in F:\UnityProjects\UIToolkitRuntimeUISampler\Library\PackageCache\com.unity.ui@1.0.0-preview.14\Core\Events\MouseEventDispatchingStrategy.cs:35
    8.   at UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) [0x00000] in F:\UnityProjects\UIToolkitRuntimeUISampler\Library\PackageCache\com.unity.ui@1.0.0-preview.14\Core\Events\MouseEventDispatchingStrategy.cs:26
    9.   at UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel iPanel) [0x0001f] in F:\UnityProjects\UIToolkitRuntimeUISampler\Library\PackageCache\com.unity.ui@1.0.0-preview.14\Core\Events\MouseEventDispatchingStrategy.cs:19
    10.   at UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) [0x0001f] in F:\UnityProjects\UIToolkitRuntimeUISampler\Library\PackageCache\com.unity.ui@1.0.0-preview.14\Core\EventDispatcher.cs:377
    11.   at UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) [0x00037] in F:\UnityProjects\UIToolkitRuntimeUISampler\Library\PackageCache\com.unity.ui@1.0.0-preview.14\Core\EventDispatcher.cs:340
    12.   at UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () [0x00035] in F:\UnityProjects\UIToolkitRuntimeUISampler\Library\PackageCache\com.unity.ui@1.0.0-preview.14\Core\EventDispatcher.cs:302
    13.   at UnityEngine.UIElements.EventDispatcher.OpenGate () [0x0002d] in F:\UnityProjects\UIToolkitRuntimeUISampler\Library\PackageCache\com.unity.ui@1.0.0-preview.14\Core\EventDispatcher.cs:266
    14.   at UnityEngine.UIElements.EventDispatcherGate.Dispose () [0x00000] in F:\UnityProjects\UIToolkitRuntimeUISampler\Library\PackageCache\com.unity.ui@1.0.0-preview.14\Core\EventDispatcher.cs:75
    15.   at UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) [0x000eb] in F:\UnityProjects\UIToolkitRuntimeUISampler\Library\PackageCache\com.unity.ui@1.0.0-preview.14\Core\EventDispatcher.cs:368
    16.   at UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) [0x0002e] in F:\UnityProjects\UIToolkitRuntimeUISampler\Library\PackageCache\com.unity.ui@1.0.0-preview.14\Core\EventDispatcher.cs:218
    17.   at UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) [0x0000e] in F:\UnityProjects\UIToolkitRuntimeUISampler\Library\PackageCache\com.unity.ui@1.0.0-preview.14\Core\Panel.cs:398
    18.   at UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) [0x000c9] in F:\UnityProjects\UIToolkitRuntimeUISampler\Library\PackageCache\com.unity.ui@1.0.0-preview.14\Core\UIElementsUtility.cs:466
    19.   at UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) [0x00030] in F:\UnityProjects\UIToolkitRuntimeUISampler\Library\PackageCache\com.unity.ui@1.0.0-preview.14\Core\UIElementsUtility.cs:209
    20.   at UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) [0x00016] in F:\UnityProjects\UIToolkitRuntimeUISampler\Library\PackageCache\com.unity.ui@1.0.0-preview.14\Core\UIElementsUtility.cs:74
    21.   at UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) [0x00000] in F:\UnityProjects\UIToolkitRuntimeUISampler\Library\PackageCache\com.unity.ui@1.0.0-preview.14\Core\UIElementsUtility.cs:28
    22.   at UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) [0x00010] in <f8197c5efb504ab8a77daf7d0e9abc5e>:0
    23.  
    24. (Filename: Library/PackageCache/com.unity.ui.builder@1.0.0-preview.12/Editor/Builder/Viewport/BuilderCanvas.cs Line: 424)
    25.  
    26.  
     
    pt-paulrahme likes this.
  16. old_pilgrim

    old_pilgrim

    Joined:
    Nov 15, 2019
    Posts:
    7
    Similar error to the above with the same setup.

    Code (CSharp):
    1. MissingMethodException: UnityEngine.UIElements.StyleLength UnityEngine.UIElements.ComputedStyle.get_width()
    2. Unity.UI.Builder.BuilderAnchorer.SetStylesFromTargetStyles () (at Library/PackageCache/com.unity.ui.builder@1.0.0-preview.12/Editor/Builder/Manipulators/BuilderAnchorer.cs:54)
    3. Unity.UI.Builder.BuilderTracker.Activate (UnityEngine.UIElements.VisualElement target) (at Library/PackageCache/com.unity.ui.builder@1.0.0-preview.12/Editor/Builder/Manipulators/BuilderTracker.cs:51)
    4. Unity.UI.Builder.BuilderManipulator.Activate (Unity.UI.Builder.BuilderPaneWindow paneWindow, Unity.UI.Builder.BuilderSelection selection, UnityEngine.UIElements.VisualTreeAsset visualTreeAsset, UnityEngine.UIElements.VisualElement target) (at Library/PackageCache/com.unity.ui.builder@1.0.0-preview.12/Editor/Builder/Manipulators/BuilderManipulator.cs:40)
    5. Unity.UI.Builder.BuilderViewport.SetInnerSelection (UnityEngine.UIElements.VisualElement selectedElement) (at Library/PackageCache/com.unity.ui.builder@1.0.0-preview.12/Editor/Builder/Viewport/BuilderViewport.cs:489)
    6. Unity.UI.Builder.BuilderViewport.OnPick (UnityEngine.UIElements.MouseDownEvent evt) (at Library/PackageCache/com.unity.ui.builder@1.0.0-preview.12/Editor/Builder/Viewport/BuilderViewport.cs:353)
    7. UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/Events/EventCallback.cs:64)
    8. UnityEngine.UIElements.EventCallbackRegistry.InvokeCallbacks (UnityEngine.UIElements.EventBase evt) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/Events/EventCallbackRegistry.cs:341)
    9. UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/Events/EventHandler.cs:147)
    10. UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/Events/IEventDispatchingStrategy.cs:147)
    11. UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToRegularTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/Events/MouseEventDispatchingStrategy.cs:35)
    12. UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/Events/MouseEventDispatchingStrategy.cs:26)
    13. UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel iPanel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/Events/MouseEventDispatchingStrategy.cs:19)
    14. 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.14/Core/EventDispatcher.cs:377)
    15. UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/EventDispatcher.cs:340)
    16. UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/EventDispatcher.cs:302)
    17. UnityEngine.UIElements.EventDispatcher.OpenGate () (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/EventDispatcher.cs:266)
    18. UnityEngine.UIElements.EventDispatcherGate.Dispose () (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/EventDispatcher.cs:75)
    19. UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/EventDispatcher.cs:368)
    20. UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/EventDispatcher.cs:218)
    21. UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/Panel.cs:398)
    22. UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/UIElementsUtility.cs:466)
    23. 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.14/Core/UIElementsUtility.cs:209)
    24. UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/UIElementsUtility.cs:74)
    25. UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/UIElementsUtility.cs:28)
    26. UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
    27.  
     
    pt-paulrahme likes this.
  17. JohngUK

    JohngUK

    Joined:
    Aug 8, 2019
    Posts:
    11
    Fixed my project - thanks for the prompt response.
     
  18. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    397
    For me Updateing to UIToolkit 1.0.0-preview.14 helped. Many thanks!
     
  19. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    397
    After working a bit I get new errors when working in UI Builder:


    Code (CSharp):
    1. MissingMethodException: UnityEngine.UIElements.StyleLength UnityEngine.UIElements.ComputedStyle.get_width()
    2. Unity.UI.Builder.BuilderAnchorer.SetStylesFromTargetStyles () (at Library/PackageCache/com.unity.ui.builder@1.0.0-preview.12/Editor/Builder/Manipulators/BuilderAnchorer.cs:54)
    3. Unity.UI.Builder.BuilderTracker.Activate (UnityEngine.UIElements.VisualElement target) (at Library/PackageCache/com.unity.ui.builder@1.0.0-preview.12/Editor/Builder/Manipulators/BuilderTracker.cs:51)
    4. Unity.UI.Builder.BuilderManipulator.Activate (Unity.UI.Builder.BuilderPaneWindow paneWindow, Unity.UI.Builder.BuilderSelection selection, UnityEngine.UIElements.VisualTreeAsset visualTreeAsset, UnityEngine.UIElements.VisualElement target) (at Library/PackageCache/com.unity.ui.builder@1.0.0-preview.12/Editor/Builder/Manipulators/BuilderManipulator.cs:40)
    5. Unity.UI.Builder.BuilderViewport.SetInnerSelection (UnityEngine.UIElements.VisualElement selectedElement) (at Library/PackageCache/com.unity.ui.builder@1.0.0-preview.12/Editor/Builder/Viewport/BuilderViewport.cs:489)
    6. Unity.UI.Builder.BuilderViewport.SelectionChanged () (at Library/PackageCache/com.unity.ui.builder@1.0.0-preview.12/Editor/Builder/Viewport/BuilderViewport.cs:527)
    7. Unity.UI.Builder.BuilderSelection.NotifyOfSelectionChange (Unity.UI.Builder.IBuilderSelectionNotifier source) (at Library/PackageCache/com.unity.ui.builder@1.0.0-preview.12/Editor/Builder/BuilderSelection.cs:292)
    8. Unity.UI.Builder.BuilderSelection.AddToSelection (Unity.UI.Builder.IBuilderSelectionNotifier source, UnityEngine.UIElements.VisualElement ve, System.Boolean undo, System.Boolean sort) (at Library/PackageCache/com.unity.ui.builder@1.0.0-preview.12/Editor/Builder/BuilderSelection.cs:187)
    9. Unity.UI.Builder.BuilderSelection.AddToSelection (Unity.UI.Builder.IBuilderSelectionNotifier source, UnityEngine.UIElements.VisualElement ve) (at Library/PackageCache/com.unity.ui.builder@1.0.0-preview.12/Editor/Builder/BuilderSelection.cs:171)
    10. Unity.UI.Builder.BuilderExplorer.ElementSelectionChanged (System.Collections.Generic.List`1[T] elements) (at Library/PackageCache/com.unity.ui.builder@1.0.0-preview.12/Editor/Builder/Explorer/BuilderExplorer.cs:139)
    11. Unity.UI.Builder.ElementHierarchyView.OnSelectionChange (System.Collections.Generic.IEnumerable`1[T] items) (at Library/PackageCache/com.unity.ui.builder@1.0.0-preview.12/Editor/Utilities/ElementHierarchyView/ElementHierarchyView.cs:545)
    12. UnityEngine.UIElements.TreeView.OnSelectionChange (System.Collections.Generic.IEnumerable`1[T] selectedListItems) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/Controls/TreeView.cs:453)
    13. UnityEngine.UIElements.ListView.NotifyOfSelectionChange () (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/Controls/ListView.cs:1298)
    14. UnityEngine.UIElements.ListView.SetSelectionInternal (System.Collections.Generic.IEnumerable`1[T] indices, System.Boolean sendNotification) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/Controls/ListView.cs:1288)
    15. UnityEngine.UIElements.ListView.SetSelection (System.Collections.Generic.IEnumerable`1[T] indices) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/Controls/ListView.cs:1266)
    16. UnityEngine.UIElements.ListView.SetSelection (System.Int32 index) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/Controls/ListView.cs:1257)
    17. UnityEngine.UIElements.ListView.DoSelect (UnityEngine.Vector2 localPosition, System.Int32 clickCount, System.Boolean actionKey, System.Boolean shiftKey) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/Controls/ListView.cs:1094)
    18. UnityEngine.UIElements.ListView.ProcessPointerDown (UnityEngine.UIElements.IPointerEvent evt) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/Controls/ListView.cs:1018)
    19. UnityEngine.UIElements.ListView.OnPointerDown (UnityEngine.UIElements.PointerDownEvent evt) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/Controls/ListView.cs:981)
    20. UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/Events/EventCallback.cs:64)
    21. UnityEngine.UIElements.EventCallbackRegistry.InvokeCallbacks (UnityEngine.UIElements.EventBase evt) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/Events/EventCallbackRegistry.cs:341)
    22. UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/Events/EventHandler.cs:147)
    23. UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/Events/IEventDispatchingStrategy.cs:147)
    24. UnityEngine.UIElements.PointerEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/Events/PointerEventDispatchingStrategy.cs:21)
    25. UnityEngine.UIElements.PointerEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/Events/PointerEventDispatchingStrategy.cs:13)
    26. 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.14/Core/EventDispatcher.cs:377)
    27. UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/EventDispatcher.cs:340)
    28. UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/EventDispatcher.cs:218)
    29. UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/Panel.cs:398)
    30. UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/UIElementsUtility.cs:466)
    31. 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.14/Core/UIElementsUtility.cs:209)
    32. UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/UIElementsUtility.cs:74)
    33. UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at Library/PackageCache/com.unity.ui@1.0.0-preview.14/Core/UIElementsUtility.cs:28)
    34. UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <f8197c5efb504ab8a77daf7d0e9abc5e>:0)
    35.  
    Ah i see that is the same error the others get
     
  20. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    397
    When I downgrade to 2020.2.2 and keep UIToolkit preview14 the MissingMethodException is gone, so it seams that error is Unity-Version vs UIBuilder related.
     
    pt-paulrahme likes this.
  21. uMathieu

    uMathieu

    Unity Technologies

    Joined:
    Jun 6, 2017
    Posts:
    398
    @manuelgoellnitz @old_pilgrim @shiena Can you report the issue using Help->Report a bug...

    I tried to reproduce it here without success. You might want to try to remove the ui builder package and re-add it to force a recompilation
     
  22. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    397
    I reported it:
    (Case 1314030) MissingMethodException in the UIBuilder after updateing Unity 2020.2.3
     
  23. shiena

    shiena

    Joined:
    May 19, 2017
    Posts:
    44
    Thanks! I re-added the ui builder and it solved the problem with resizing the preview window.
     
  24. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    397
    Is that a permanent solution? When i reported the bug the error occured only after I reopened the project.
     
  25. shiena

    shiena

    Joined:
    May 19, 2017
    Posts:
    44
    Maybe you need to install UIToolkit before UIBuilder.
    If you install them in the reverse order, you will get the above error.
     
  26. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    397
    I tried the workaround and it did the trick for some time. But after working a bit with the ui builder the error is back.
     
    pt-paulrahme likes this.
  27. Refeas

    Refeas

    Joined:
    Nov 8, 2016
    Posts:
    192
    @uMathieu Hi, the issuetracker states that the issue is fixed in 2021.1 and 2021.2, which is not helpful at all for people who don't use alphas/betas. Will this be backported for the 2020.2 UI Builder package? I'm getting the same error on 2020.2.5/6 UI Builder preview12.

    Thanks!
     
    Midiphony-panda likes this.
  28. Midiphony-panda

    Midiphony-panda

    Joined:
    Feb 10, 2020
    Posts:
    243
    Bump
    It's unclear/hard to reproduce every single time but reimporting UI Builder only works some times in Unity 2020.2(.6), before the following exception triggers again :
    MissingMethodException: UnityEngine.UIElements.StyleLength UnityEngine.UIElements.ComputedStyle.get_width()

    It fires again when reopening the project, or triggering a new compilation after editing a script, or... I can't find the exact steps to reproduce it consistently, yet.
     
    Refeas likes this.
  29. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    397
    For me it's working without errors for over a week now.
     
  30. Digika

    Digika

    Joined:
    Jan 7, 2018
    Posts:
    225
    Damn, a whole week, 99 LCK here
     
  31. DrSeltsam

    DrSeltsam

    Joined:
    Jul 24, 2019
    Posts:
    101
    I ran into the same issue:
    MissingMethodException: UnityEngine.UIElements.StyleLength UnityEngine.UIElements.ComputedStyle.get_width()


    Deleting and reimporting the UI Builder package fixes this issue temporarily, but it suddenly comes back after a while (usually after restarting the editor, but not always). There is unfortunately no clear way to reproduce it, it just comes back sporadically.

    I'm using Unity 2020.2.6f1, UI Builder 1.0.0-preview.12, UI Toolkit 1.0.0-preview.14 and TextMeshPro 3.0.4
     
    pt-paulrahme likes this.
  32. shiena

    shiena

    Joined:
    May 19, 2017
    Posts:
    44
  33. pt-paulrahme

    pt-paulrahme

    Joined:
    Apr 22, 2020
    Posts:
    3
    UIBuilder has stopped compiling altogether in 2020.3 LTS, but apparently they are working on an urgent fix for both of these (in 2020.3).
    Not sure if it's being backported to 2020.2.x...
     
  34. Digika

    Digika

    Joined:
    Jan 7, 2018
    Posts:
    225
    Lmao probably not even though they promised this is the lowest version that will be supported for package.
    This is the history of UTK in a nutshell - promises being broken every month and users misled.
     
  35. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    397
    The reason is probably that more and more unity-editor stuff is done with uitoolkit, but it is still a preview package and not build in.
    So something in there gets confused...