Search Unity

Official UI Toolkit 1.0-preview available

Discussion in 'UI Toolkit' started by benoitd_unity, Jul 8, 2020.

  1. slimshader

    slimshader

    Joined:
    Jun 11, 2013
    Posts:
    187
    Hi, just tried previrev-12 in Unity 2020.2.b11 and getting
    Code (CSharp):
    1. The scripted importer 'UIElementsViewImporter' attempted to register file type '.uxml', which is handled by a native Unity importer. Registration rejected.
    2. UnityEditor.AssetImporters.ScriptedImporter:RegisterScriptedImporters ()
    and

    Code (CSharp):
    1. The scripted importer 'StyleSheetImporter' attempted to register file type '.uss', which is handled by a native Unity importer. Registration rejected.
    2. UnityEditor.AssetImporters.ScriptedImporter:RegisterScriptedImporters ()
     
  2. JuliaP_Unity

    JuliaP_Unity

    Unity Technologies

    Joined:
    Mar 26, 2020
    Posts:
    700
    This is a known issue that is being solved in the Unity Editor for coming versions, if you close/reopen or simply Reimport All assets (which reloads the Editor) it'll all be good for now.
     
  3. herra_lehtiniemi

    herra_lehtiniemi

    Joined:
    Feb 12, 2017
    Posts:
    133
    I tried adding com.unity.ui from GitHub into my project, but after PackageManager has finished installing, I get the following errors in the console:

    Code (CSharp):
    1. Library/PackageCache/com.unity.textcore@1.0.0-preview.2/Scripts/Runtime/FontFeatureCommon.cs(163,16): error CS0246: The type or namespace name 'FontFeatureLookupFlags' could not be found (are you missing a using directive or an assembly reference?)
    2.  
    3. Library/PackageCache/com.unity.textcore@1.0.0-preview.2/Scripts/Runtime/FontFeatureCommon.cs(163,16): error CS0246: The type or namespace name 'FontFeatureLookupFlags' could not be found (are you missing a using directive or an assembly reference?)
    Is there some way to fix this? I think preview version 12 was installed.

    As an additional question - In the preview 10 release notes there was a mention of:
    • Added support for new USS text properties for TextElement
    Is this related to text formatting somehow? If yes, where could I find more info on this?
     
  4. antoine-unity

    antoine-unity

    Unity Technologies

    Joined:
    Sep 10, 2015
    Posts:
    780
    First of all, I believe you'd need to upgrade your Unity version. Unity 2020.2.0b9 is required.

    Second, you can more info about the new text related features here:
    https://forum.unity.com/threads/feedback-wanted-new-text-engine.1007585/
     
  5. herra_lehtiniemi

    herra_lehtiniemi

    Joined:
    Feb 12, 2017
    Posts:
    133
    Thank you! I now got rid of the errors in Unity console, but now VS Code Omnisharp gives errors on all UI Toolkit -related stuff (see attachment). On Unity's side I get no errors and the project works. Should I update something on VS Code side as well or what might cause this?
     

    Attached Files:

  6. antoine-unity

    antoine-unity

    Unity Technologies

    Joined:
    Sep 10, 2015
    Posts:
    780
    I'd recommend regenerating the CShap project from Unity. If that doesn't work let's start a separate forum thread.
     
  7. herra_lehtiniemi

    herra_lehtiniemi

    Joined:
    Feb 12, 2017
    Posts:
    133
  8. kulnor

    kulnor

    Joined:
    May 23, 2016
    Posts:
    7
    Just trying to use UI Toolkit / UI Buildler for first time, but seeing series of errors like below with 2020.2.1f or
    2020.15.1f on Mac OSX. I can create a UI document asset but it in is Visual Studio (not the editor). Any suggestions?

    Library/PackageCache/com.unity.ui.builder@1.0.0-preview.10/Editor/Builder/Utilities/BuilderStyleUtilities.cs(11,123): error CS0122: 'StyleRule' is inaccessible due to its protection level

    Library/PackageCache/com.unity.ui.builder@1.0.0-preview.10/Editor/Builder/Utilities/BuilderStyleUtilities.cs(18,89): error CS0122: 'StyleRule' is inaccessible due to its protection level

    Library/PackageCache/com.unity.ui.builder@1.0.0-preview.10/Editor/Builder/Utilities/BuilderStyleUtilities.cs(18,16): error CS0122: 'StyleProperty' is inaccessible due to its protection level

    Library/PackageCache/com.unity.ui.builder@1.0.0-preview.10/Editor/Builder/Explorer/BuilderHierarchyUtilities.cs(8,97): error CS0122: 'TemplateAsset' is inaccessible due to its protection level

    Library/PackageCache/com.unity.ui.builder@1.0.0-preview.10/Editor/Builder/Utilities/BuilderStyleUtilities.cs(43,74): error CS0122: 'StyleRule' is inaccessible due to its protection level

    Library/PackageCache/com.unity.ui.builder@1.0.0-preview.10/Editor/Builder/Utilities/BuilderStyleUtilities.cs(67,74): error CS0122: 'StyleRule' is inaccessible due to its protection level

    Library/PackageCache/com.unity.ui.builder@1.0.0-preview.10/Editor/Utilities/StyleField/VariableCompleter.cs(84,23): error CS0122: 'StyleValueType' is inaccessible due to its protection level

    (more....)
     
  9. NanoShark

    NanoShark

    Joined:
    Nov 28, 2020
    Posts:
    1
    Looks like UI Builder 1.0.0-preview.10 is not compatible with the latest UI Toolkit (preview.12). If you change the UI Builder version to preview.9 it should work.
     
    kulnor likes this.
  10. kulnor

    kulnor

    Joined:
    May 23, 2016
    Posts:
    7
    That seem to work fine indeed. Thanks for the feedback, very much appreciated!
     
  11. kulnor

    kulnor

    Joined:
    May 23, 2016
    Posts:
    7
    Using Unity 2020.1.15f1 / UI Toolkit preview 12 / UI Builder preview 9.
    Created a simple UI header and, when I save the file from the UI Builder, the rendering gets corrupted. See before and after images below. The following error is displayed in the console.


    Accessing invalid property
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)


    The workaround is to simply close and reopen the UI builder.

    before save:
    UI_builder_before_save.png
    after save:
    UI_builder_after_save.png


    <ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
    <ui:VisualElement name="header" style="height: 5%; flex-direction: row; margin-top: 5px; margin-bottom: 5px;">
    <ui:VisualElement style="width: 2%; background-color: rgb(229, 140, 42); height: 100%; border-top-left-radius: 50%; border-bottom-left-radius: 50%; margin-left: 10px;" />
    <ui:VisualElement style="width: 96%; height: 100%; flex-direction: row; margin-left: 5px; margin-right: 5px;">
    <ui:VisualElement style="width: 84%; background-color: rgb(229, 140, 42); height: 100%; border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; -unity-font-style: normal; padding-left: 5px; padding-right: 5px; padding-top: 5px; padding-bottom: 5px;">
    <ui:Label text="RDS-1701" display-tooltip-when-elided="True" style="-unity-font: url(&apos;/Assets/fonts/startrek/TNG_Credits.ttf&apos;); font-size: 50%; color: rgba(200, 200, 200, 0.78); padding-left: 0; padding-right: 0; padding-top: 0; padding-bottom: 0; -unity-text-align: middle-left; margin-left: 5px;" />
    </ui:VisualElement>
    <ui:VisualElement style="-unity-font: url(&apos;/Assets/fonts/startrek/Trek_TNG_Monitors.ttf&apos;); font-size: 48px; margin-left: 10px; margin-right: 10px; width: auto;">
    <ui:Label text="UI LABS" display-tooltip-when-elided="True" style="color: rgb(225, 143, 20); font-size: 50%; padding-left: 0; padding-right: 5px; -unity-font-style: normal; -unity-text-align: middle-center; -unity-font: url(&apos;/Assets/fonts/startrek/Federation_Wide.ttf&apos;);" />
    </ui:VisualElement>
    </ui:VisualElement>
    <ui:VisualElement style="width: 2%; background-color: rgb(229, 140, 42); height: 100%; border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; border-top-right-radius: 50%; border-bottom-right-radius: 50%; margin-right: 10px;" />
    </ui:VisualElement>
    </ui:UXML>
     
  12. Rudow

    Rudow

    Joined:
    Nov 26, 2020
    Posts:
    2
    I have been getting the same issues as you in this thread (both above and the following:

    Library/PackageCache/com.unity.ui.builder@1.0.0-preview.10/Editor/Builder/Utilities/BuilderStyleUtilities.cs(11,123): error CS0122: 'StyleRule' is inaccessible due to its protection level


    I was able to fix your original "inaccessible due to its protection level" issues the same way that you did (switching to UI Builder version preview.9) and I am now also get issues when saving a uxml.

    One issue is that some of my visual elements will shrink to having 0 width and/or height. This usually happens if I do not explicitly set a width or height and am instead letting child elements dictate the size as was demonstrated in the 2019 Unite talk (tanks demo). This has a fairly consistent repro rate.

    When using a ScrollView with a few buttons inside, the above issue happens every time (regardless of seeting a height/width on the parent or children) after saving, as well as either having the buttons completely disappear in the Viewport, or having the ScrollView unable to be resized again. During the latter, this is spammed in the logs following a few of the
    Accessing invalid property
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
    :
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. Unity.UI.Builder.StyleRuleExtensions.FindProperty (UnityEngine.UIElements.StyleSheet styleSheet, UnityEngine.UIElements.StyleRule rule, System.String propertyName) (at Library/PackageCache/com.unity.ui.builder@1.0.0-preview.9/Editor/Utilities/StyleSheetExtensions/StyleRuleExtensions.cs:12)
    3. Unity.UI.Builder.BuilderManipulator.SetStyleSheetValue (System.String styleName, System.Single value) (at Library/PackageCache/com.unity.ui.builder@1.0.0-preview.9/Editor/Builder/Manipulators/BuilderManipulator.cs:252)
    4. Unity.UI.Builder.BuilderManipulator.SetStyleSheetValue (Unity.UI.Builder.BuilderManipulator+TrackedStyle trackedStyle, System.Single value) (at Library/PackageCache/com.unity.ui.builder@1.0.0-preview.9/Editor/Builder/Manipulators/BuilderManipulator.cs:240)
    5. Unity.UI.Builder.BuilderResizer.OnDrag (Unity.UI.Builder.BuilderManipulator+TrackedStyle primaryStyle, System.Single onStartDragLength, System.Single onStartDragPrimary, System.Single delta, System.Collections.Generic.List`1[T] changeList) (at Library/PackageCache/com.unity.ui.builder@1.0.0-preview.9/Editor/Builder/Manipulators/BuilderResizer.cs:104)
    6. Unity.UI.Builder.BuilderResizer.OnDragBottom (UnityEngine.Vector2 diff, System.Collections.Generic.List`1[T] changeList) (at Library/PackageCache/com.unity.ui.builder@1.0.0-preview.9/Editor/Builder/Manipulators/BuilderResizer.cs:138)
    7. Unity.UI.Builder.BuilderResizer.OnDragBottomRight (UnityEngine.Vector2 diff) (at Library/PackageCache/com.unity.ui.builder@1.0.0-preview.9/Editor/Builder/Manipulators/BuilderResizer.cs:221)
    8. Unity.UI.Builder.BuilderTransformer+Manipulator.OnMouseMove (UnityEngine.UIElements.MouseMoveEvent e) (at Library/PackageCache/com.unity.ui.builder@1.0.0-preview.9/Editor/Builder/Manipulators/BuilderTransformer.cs:142)
    9. UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/Events/EventCallback.cs:64)
    10. UnityEngine.UIElements.EventCallbackRegistry.InvokeCallbacks (UnityEngine.UIElements.EventBase evt) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/Events/EventCallbackRegistry.cs:341)
    11. UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/Events/EventHandler.cs:147)
    12. UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/Events/EventHandler.cs:125)
    13. UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/Events/MouseCaptureDispatchingStrategy.cs:83)
    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.12/Core/EventDispatcher.cs:373)
    15. UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/EventDispatcher.cs:336)
    16. UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/EventDispatcher.cs:299)
    17. UnityEngine.UIElements.EventDispatcher.OpenGate () (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/EventDispatcher.cs:264)
    18. UnityEngine.UIElements.EventDispatcherGate.Dispose () (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/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.12/Core/EventDispatcher.cs:364)
    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.12/Core/EventDispatcher.cs:216)
    21. UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/Panel.cs:411)
    22. UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/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.12/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.12/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.12/Core/UIElementsUtility.cs:28)
    26. UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <6cf4b8f7a4344e9e9df60cc4c1690d8c>:0)
    27.  
    UIBuilder_ShrinkingScrollView_postSave.JPG


    I'm also seeing other issues like data being swapped between two VisualElements? I placed 2 children VisualElements and set
    Flex-direction: row
    and
    justify-content: space-between
    in the parent so that I have columns on the left and right of the screen (also demonstrated in the 2019 Unite talk). I gave the left side a green-tinted background and the right side a red-tinted background. When I saved, the two VisualElements swapped colors in the viewport, but their positions in the viewport are still correct and they report the correct colors in the inspector. This has a 100% repro rate.

    after saving:
    UIBuilderSaveColorSwap.JPG

    No logs were printed during the color-swap issue.

    Unity version: 2020.1.14f1
    UIBuilder: 1.0.0-preview.9
    UIToolkit: 1.0.0-preview.12
     

    Attached Files:

    kulnor likes this.
  13. Artpen

    Artpen

    Joined:
    Jan 24, 2015
    Posts:
    291
    Hi guys,

    I am just starting with new UI Builder. Just a quick question are there any ui element transitions or animation features are available ? Say sliding or expanding menus, drag and drop?

    Thank you
     
    Rudow, Ruchir and FernandoMK like this.
  14. kulnor

    kulnor

    Joined:
    May 23, 2016
    Posts:
    7
    FYI, the above "inaccessible" issue is fixed in UI Toolkit Preview 13 (so you can then upgrade to UI Builder Preview 10).
     
    Rudow likes this.
  15. Crayz

    Crayz

    Joined:
    Mar 17, 2014
    Posts:
    194
    :hover seems to not be working, anybody else?

    I'm on Unity 2020.2.0b14 and UI Toolkit 1.0.0-preview.13, Active Input Handling set to Both in Player settings.
     
  16. Artpen

    Artpen

    Joined:
    Jan 24, 2015
    Posts:
    291
    Anyone from Unity? Is there a way to move animate panels in UI builder?
     
  17. Artpen

    Artpen

    Joined:
    Jan 24, 2015
    Posts:
    291
    I am using Figma for my UI and it looks like UI builder has similar approach, which is much better for my needs. Animations transitions would be great to have
     
  18. MousePods

    MousePods

    Joined:
    Jul 19, 2012
    Posts:
    811
  19. JorisEertink

    JorisEertink

    Joined:
    Mar 15, 2017
    Posts:
    24
    @antoine-unity @JuliaP_Unity ,

    I am looking for a way to download a .uxml file from our server(Not through addressables) so we can modify our UI layout post-release. But for what I understand at the moment, the process of converting a uxml file to a VisualTreeAsset SO is currently editor only. Is there a way where we could download a uxml file as pure text at runtime and use it to visualize our UI?

    Many thanks!
     
    bdovaz, Midiphony-panda and JesOb like this.
  20. antoine-unity

    antoine-unity

    Unity Technologies

    Joined:
    Sep 10, 2015
    Posts:
    780
    Hello, no this is not possible currently. There are several libraries which are not currently available at runtime, not to mention additional complications of resolving file dependencies.
    A solution around Asset Bundles is probably the way to go at the moment.
     
  21. JorisEertink

    JorisEertink

    Joined:
    Mar 15, 2017
    Posts:
    24
    Thats unfortunate, is this anywhere on the roadmap? It would be very beneficial to many people I assume.
     
  22. Crayz

    Crayz

    Joined:
    Mar 17, 2014
    Posts:
    194
    Marking my interest for this. I always incorporate runtime scripting into projects to increase productivity and/or modding, with this new system it's a perfect opportunity to make it possible with UI as well.
     
  23. oobartez

    oobartez

    Joined:
    Oct 12, 2016
    Posts:
    167
    After adding com.unity.ui to an empty project I'm getting several warnings like this:

    Cannot add menu item 'CONTEXT/Material/Select Material' for method 'TextCoreContextMenuItems.SelectMaterial' because a menu item with the same name already exists.
    UnityEditor.EditorApplication:Internal_InvokeTickEvents ()
     
    offbalance likes this.
  24. PlaycorpStudios

    PlaycorpStudios

    Joined:
    Aug 2, 2016
    Posts:
    48
    After updating our project to Unity 2020.1.17f1 UI Builder is broken.
    The UI Builder package doesn't seem to have the "UI_BUILDER_PACKAGE" define set. Consequently, all of it's paths for loading assets are wrong. This results in the Library panel being empty.
    This is in UI Builder 1.0.0 preview 11

    upload_2020-12-21_4-56-12.png

    ArgumentNullException: Value cannot be null.
    Parameter name: styleSheet
    UnityEngine.UIElements.VisualElementStyleSheetSet.Add (UnityEngine.UIElements.StyleSheet styleSheet) (at <51648d78f489425494db94c505b138b2>:0)
    Unity.UI.Builder.LibraryFoldout..ctor () (at Library/PackageCache/com.unity.ui.builder@1.0.0-preview.11/Editor/Utilities/LibraryFoldout/LibraryFoldout.cs:22)
    Unity.UI.Builder.BuilderLibraryPlainView.FillView (System.Collections.Generic.IEnumerable`1[T] items, UnityEngine.UIElements.VisualElement itemsParent) (at Library/PackageCache/com.unity.ui.builder@1.0.0-preview.11/Editor/Builder/Library/BuilderLibraryPlainView.cs:171)
     
  25. antoine-unity

    antoine-unity

    Unity Technologies

    Joined:
    Sep 10, 2015
    Posts:
    780
    This should disappear when having the latest TextMeshPro package.

    I mentioned it to the team. Can you post a separate thread for this?
     
  26. adammpolak

    adammpolak

    Joined:
    Sep 9, 2018
    Posts:
    450
    Is UI Toolkit expected to work on iOS?

    Unity 2020.1.17f1
    Xcode 12.3

    "com.unity.ugui": "1.0.0",
    "com.unity.ui": "1.0.0-preview.13",
    "com.unity.ui.builder": "1.0.0-preview.11",
    "com.unity.modules.imgui": "1.0.0",
    "com.unity.modules.ui": "1.0.0",
    "com.unity.modules.uielements": "1.0.0"

    I have my UI running fine on OSX:


    But on iOS I receive:
    Code (CSharp):
    1.  
    2. Adam  12:36 PM
    3. ArgumentNullException: Value cannot be null.
    4. Parameter name: shader
    5.   at UnityEngine.UIElements.UIR.UIRenderDevice.get_shaderModelIs35 () [0x00000] in <00000000000000000000000000000000>:0
    6.   at UnityEngine.UIElements.UIR.TextureSlotManager..cctor () [0x00000] in <00000000000000000000000000000000>:0
    7.   at UnityEngine.UIElements.UIR.UIRenderDevice..ctor (System.UInt32 initialVertexCapacity, System.UInt32 initialIndexCapacity, System.Boolean mockDevice) [0x00000] in <00000000000000000000000000000000>:0
    8.   at UnityEngine.UIElements.UIR.RenderChain..ctor (UnityEngine.UIElements.BaseVisualElementPanel panel) [0x00000] in <00000000000000000000000000000000>:0
    9.   at UnityEngine.UIElements.UIRRepaintUpdater.CreateRenderChain () [0x00000] in <00000000000000000000000000000000>:0
    10.   at UnityEngine.UIElements.UIRRepaintUpdater.InitRenderChain () [0x00000] in <00000000000000000000000000000000>:0
    11.   at UnityEngine.UIElements.UIRRepaintUpdater.Update () [0x00000] in <00000000000000000000000000000000>:0
    12.   at UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) [0x00000] in <00000000000000000000000000000000>:0
    13.   at UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) [0x00000] in <00000000000000000000000000000000>:0
    14.   at UnityEngine.UIElements.BaseRuntimePanel.Repaint (UnityEngine.Event e) [0x00000] in <00000000000000000000000000000000>:0
    15.   at UnityEngine.UIElements.UIElementsRuntimeUtility.RepaintOverlayPanels () [0x00000] in <00000000000000000000000000000000>:0
    16.   at System.Action.Invoke () [0x00000] in <00000000000000000000000000000000>:0
    17. Rethrow as TypeInitializationException: The type initializer for 'UnityEngine.UIElements.UIR.TextureSlotManager' threw an exception.
    18.   at UnityEngine.UIElements.UIR.UIRenderDevice..ctor (System.UInt32 initialVertexCapacity, System.UInt32 initialIndexCapacity, System.Boolean mockDevice) [0x00000] in <00000000000000000000000000000000>:0
    19.   at UnityEngine.UIElements.UIR.RenderChain..ctor (UnityEngine.UIElements.BaseVisualElementPanel panel) [0x00000] in <00000000000000000000000000000000>:0
    20.   at UnityEngine.UIElements.UIRRepaintUpdater.CreateRenderChain () [0x00000] in <00000000000000000000000000000000>:0
    21.   at UnityEngine.UIElements.UIRRepaintUpdater.InitRenderChain () [0x00000] in <00000000000000000000000000000000>:0
    22.   at UnityEngine.UIElements.UIRRepaintUpdater.Update () [0x00000] in <00000000000000000000000000000000>:0
    23.   at UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) [0x00000] in <00000000000000000000000000000000>:0
    24.   at UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) [0x00000] in <00000000000000000000000000000000>:0
    25.   at UnityEngine.UIElements.BaseRuntimePanel.Repaint (UnityEngine.Event e) [0x00000] in <00000000000000000000000000000000>:0
    26.   at UnityEngine.UIElements.UIElementsRuntimeUtility.RepaintOverlayPanels () [0x00000] in <00000000000000000000000000000000>:0
    27.   at System.Action.Invoke () [0x00000] in <00000000000000000000000000000000>:0
    28. (Filename: currently not available on il2cpp Line: -1)
    EDIT: Reimporting all the assets fixed this issue.
     
    Last edited: Dec 21, 2020
  27. adammpolak

    adammpolak

    Joined:
    Sep 9, 2018
    Posts:
    450
    Is there a "overflow: scroll" equivalent for UIToolkit?

    I have had to wrap all my screens in a ScrollView for iPhoneSE resolutions. Makes navigating UIBuilder pretty unwieldy.

    upload_2020-12-21_14-29-2.png

    Also, is it a known issue that ScrollView is wonky for iOS? As I try to scroll using an iPhone it kind of jumps around and I have to try to "catch" the scroll bar on the right to navigate:
     

    Attached Files:

  28. PlaycorpStudios

    PlaycorpStudios

    Joined:
    Aug 2, 2016
    Posts:
    48
    After installing "com.unity.ui": "1.0.0-preview.13" - The issue went away somehow.
    Now I can't reproduce it.
     
  29. antoine-unity

    antoine-unity

    Unity Technologies

    Joined:
    Sep 10, 2015
    Posts:
    780
    Please post a separate issue in the forum.
     
  30. OrlovskyConsultingGbR

    OrlovskyConsultingGbR

    Joined:
    Mar 17, 2020
    Posts:
    63
    I am so happy , i tried yesterday the newest toolkit in Unity3D 2020 and this what i got:
    CityViewDetailsPrototypeUnity3D2020.png.jpg
    It still work in progress , but its really cool how easy you can create such "complex" UI's in Unity!
     
  31. oobartez

    oobartez

    Joined:
    Oct 12, 2016
    Posts:
    167
    JesOb likes this.
  32. destrozates

    destrozates

    Joined:
    Nov 7, 2013
    Posts:
    26
    It seems that UI Toolkit and/or UI Builder are not compatible with Unity 2020.2.3 version I am getting the following errors that are not letting me compile:
    upload_2021-2-6_13-32-27.png
    When downgrading to Unity 2020.2.2 the error disappears... Any advice?
     
  33. KiaAzad

    KiaAzad

    Joined:
    May 14, 2018
    Posts:
    16
    As the laziest user around, I've installed the `UI Builder` preview package from the package manager list (since that's where the first place the new users look for it) and now I have few Karen questions about few things:

    - Do I still have to install both `com.unity.ui` and `com.unity.ui.builder` packages from URL?
    - There is a package named `Unity UI` installed in the project is it related to `com.unity.ui`?
    - Will these packages be merged into one once they're ready to use?

    I know I should've follow the steps in the first post but I've been looking for an excuse to ask for the manager and demand reassurance that everybody is working overtime to deliver this feature sooner than possible ever since I've seen the first video on it.
     
    destrozates likes this.
  34. Roboserg

    Roboserg

    Joined:
    Jun 3, 2018
    Posts:
    83
    Is Unity 2020.2.3 supported? In an empty scene I am getting this
     
    destrozates likes this.
  35. destrozates

    destrozates

    Joined:
    Nov 7, 2013
    Posts:
    26
    @KiaAzad Unity UI is the default UI framework that comes with Unity, that is just the regular UI that we are now used to.
    If you want to be able to build runtime UI with UI Toolkit and UI builder you have to get the package named com.unity.ui If you just want to build Editor UI you don't really need that. As far as your last question..... I wouldn't know.
     
    KiaAzad likes this.
  36. destrozates

    destrozates

    Joined:
    Nov 7, 2013
    Posts:
    26
    @Roboserg If you see the post I made before yours, I am getting also some errors when using Unity 2020.2.3, I had to downgrade to 2020.2.2 until they fix it. I managed to get some errors to go away after updating TextMesh Pro, but it doesn't seem to be the case you have.
     
  37. Roboserg

    Roboserg

    Joined:
    Jun 3, 2018
    Posts:
    83
    only some errors? What version of Unity has no errors with UIElements? :)
     
  38. destrozates

    destrozates

    Joined:
    Nov 7, 2013
    Posts:
    26
    Well, this is my first time trying UI Elements, but I can tell you that I have no errors on Unity 2020.2.2
     
  39. Roboserg

    Roboserg

    Joined:
    Jun 3, 2018
    Posts:
    83
    I updated every single package (even Timeline etc) and it seems I have no errors in 2020.2.3f1 for now
     
    destrozates likes this.
  40. destrozates

    destrozates

    Joined:
    Nov 7, 2013
    Posts:
    26
    Perfect, This worked for me too!! Thank you so much @Roboserg
     
  41. destrozates

    destrozates

    Joined:
    Nov 7, 2013
    Posts:
    26
    Well... actually it kind of worked, in the sense that I no longer get the errors when the project opens but now I am getting these errors when selecting any of the elements in the UI builder:
    upload_2021-2-13_8-1-5.png
    Any advice?
     
  42. shiena

    shiena

    Joined:
    May 19, 2017
    Posts:
    44
  43. destrozates

    destrozates

    Joined:
    Nov 7, 2013
    Posts:
    26
    After several tries, I was able to fix the problem by removing the UI Builder package and adding it back again to the project. Now I am not getting any errors
     
    adammpolak likes this.
  44. destrozates

    destrozates

    Joined:
    Nov 7, 2013
    Posts:
    26
    adammpolak likes this.
  45. Digika

    Digika

    Joined:
    Jan 7, 2018
    Posts:
    225
    I remember a while back one of the UIToolkit devs shared an example of how to generate UI runtime without any resource dependencies, straight form code via inheritance approach, but I cant find it. Does anyone remember where it is?
     
    Last edited: Feb 23, 2021
  46. Digika

    Digika

    Joined:
    Jan 7, 2018
    Posts:
    225
    In this Unity Royale sample project, when is TitleScreen script being instantiated? It is referenced in the UXMl as
    Code (JavaScript):
    1. [code=JavaScript]<UnityRoyale.TitleScreenManager class="screen">
    2.         <Style src="TitleScreenManager.uss" />
    3.         <ui:Instance template="TitleScreen" name="TitleScreen" class="screen" />
    4.         <ui:Instance template="Options" name="OptionsScreen" class="screen" style="display: none;" />
    5.         <ui:Instance template="About" name="AboutScreen" class="screen" style="display: none;" />
    6.     </UnityRoyale.TitleScreenManager>
    [/code]

    When it comes to life? My assumption is once GO that holds the UI Document comes to live, UIdoc comes to live, then it read panel data and start to render it. Script being excecuted here but when?

    Can we have local version of https://docs.unity3d.com/Manual/ExecutionOrder.html for UTK?
     
  47. Nicokam

    Nicokam

    Joined:
    May 28, 2020
    Posts:
    64
    Hello everyone,

    I know this is a hard question to answer but do you guys have a prediction on when UI Toolkit will become an official package (not preview)?
    I am asking because I am making a very UI intensive game and I am about to make some investments in some assets that simplify the current UI workflow but I am willing to wait in case this will become official soon.

    I will be using the things that are not implemented yet, such as UI world placement and tweens.

    Anyways, I want your opinion in whether I should wait or not based on the prediction of the release. Thanks!!

    @antoine-unity @JuliaP_Unity
     
  48. JuliaP_Unity

    JuliaP_Unity

    Unity Technologies

    Joined:
    Mar 26, 2020
    Posts:
    700
    UI Toolkit as a package will never leave preview, however Unity version 2021.2 (and all version up from there) already have the same code that used to be in the package within the Unity installation, so the package is no longer necessary (and actually incompatible right now).
     
    mariandev likes this.
  49. Lhawika

    Lhawika

    Joined:
    May 27, 2015
    Posts:
    53
    Yet, does this mean that UI Toolkit is production ready for runtime use ?
     
    GI167789 likes this.
  50. etienne_unity

    etienne_unity

    Unity Technologies

    Joined:
    Aug 31, 2017
    Posts:
    102
    Once 2021.2 gets out of Beta, yes, this is what it means. Of course, we'll continue to improve UI Toolkit, adding features and improving performance with every new release after 2021.2.
     
    mariandev, TextusGames and Lhawika like this.