Search Unity

Official UI Toolkit 1.0-preview available

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

  1. qwert024

    qwert024

    Joined:
    Oct 21, 2015
    Posts:
    43
    Hello,
    I was wondering whether Unity UI 1.0.0 is UGUI.
    If so, what is the "released" version package for UI Toolkit?

    Will the fully supported version also be available in 2021.1? or it will be only available in 2021.2?
    I was wondering if we can use USS transition/animation in 2021.1 as well.
    It would be great if you could help clarifying!
    upload_2022-1-17_3-23-3.png
     
  2. Nexer8

    Nexer8

    Joined:
    Dec 10, 2017
    Posts:
    271
    Released version of UI Toolkit is built in.
     
  3. qwert024

    qwert024

    Joined:
    Oct 21, 2015
    Posts:
    43
    Thanks for your reply!
    Can we use USS transition/animation feature (in the attached picture) in 2021.1?
    It seems that I can't find the feature in 2021.1 upload_2022-1-17_8-51-29.png
     
  4. Nexer8

    Nexer8

    Joined:
    Dec 10, 2017
    Posts:
    271
    It was added in 2021.2, and as far as I know it won't be backported. 2021.2 is almost identical to 2021.1though, so there should be no problem updating to 2021.2.
     
  5. qwert024

    qwert024

    Joined:
    Oct 21, 2015
    Posts:
    43
    Many thanks!
     
    Nexer8 likes this.
  6. CoMANDOR

    CoMANDOR

    Joined:
    Sep 21, 2015
    Posts:
    8
    Is it possible to convert the old UI system (UGUI) to UI Toolkit? Is it possible to write a script for this, or are these systems too incompatible? If a game project is ready, with a large number of windows (screens). I liked the new system, but it's problematic to make it up from scratch.
     
  7. JuliaP_Unity

    JuliaP_Unity

    Unity Technologies

    Joined:
    Mar 26, 2020
    Posts:
    700
    Unfortunately there's nothing official that turns a UGUI UI into a UI Toolkit version. I'm not aware of third parties tool at this time, but if you make a separate post (for visibility) maybe other members of the community can help :)
     
  8. uMathieu

    uMathieu

    Unity Technologies

    Joined:
    Jun 6, 2017
    Posts:
    398
  9. Randolphjand

    Randolphjand

    Joined:
    Sep 23, 2017
    Posts:
    28
  10. elliotjb

    elliotjb

    Joined:
    Nov 15, 2015
    Posts:
    4
    help, thx
    upload_2022-2-22_13-17-3.png
     
    Last edited: Feb 22, 2022
  11. TeorikDeli

    TeorikDeli

    Joined:
    Apr 6, 2014
    Posts:
    150
    You probably have com.unity.ui.builder in your manifest file. From the 2021.2 version of Unity, the UI Toolkit/Builder is builtin, so no need to add it to your manifest file.
     
    uMathieu likes this.
  12. Deleted User

    Deleted User

    Guest

    Hello, I have a question about Slider in this new UI Toolkit.
    I have managed to apply some styling to it, though it was a real pain doing so, trying to find out all the selectors, because the slider itself is locked for some reason.

    How do I scale a slider now? Modifying the width and height through all the different CSS selections is only a cosmetic change, the interactable area of the slider handle still stays tiny. The default size is just too small for mobile uses.
     
  13. verycooldad

    verycooldad

    Joined:
    May 6, 2015
    Posts:
    4
    I get a similar error on a fresh project. Any ideas? Thank you.
     

    Attached Files:

  14. WAYNGames

    WAYNGames

    Joined:
    Mar 16, 2019
    Posts:
    992
    Same answer but for com.unity.ui

     
  15. verycooldad

    verycooldad

    Joined:
    May 6, 2015
    Posts:
    4
    I still get the same error on an empty project though.. Anyone heard of this before?
     
  16. ununion

    ununion

    Joined:
    Dec 2, 2018
    Posts:
    275
    is there any way to create a icon button but not use a rect area to receive event
     
  17. bfoddy

    bfoddy

    Joined:
    Mar 27, 2012
    Posts:
    85
    It says at the top of this thread that Textmesh Pro support would ship in 21.1 I'm on 21.3 but I can't seem to add TMP font assets to the elements. Has support for that not shipped yet? Finding it very hard to figure it out from the docs.
     
    PutridEx likes this.
  18. bfoddy

    bfoddy

    Joined:
    Mar 27, 2012
    Posts:
    85
    Also, geez, if this is the intended workflow for new projects where folks just want to implement a simple static runtime game menu (rather than a dynamically-generated database UI for a UI-oriented game), it is really a lot, lot more of a headache than the old way! It's cleaner and seems like it's more supported by Unity than the old workflows, which is great for teams with dedicated UI folks. But I shudder to think what it would have been like to teach this system to students... I think if I was still teaching gamedev, I would likely just tell students 'don't have a menu in your game'.
     
    DungDajHjep and Ofx360 like this.
  19. bfoddy

    bfoddy

    Joined:
    Mar 27, 2012
    Posts:
    85
    For anyone else who is confused by this, it seems like the answer is - there's no support for TMP fontassets, but you CAN create a new kind of fontasset for it which isn't either TMP or legacy font rendering, but instead some kind of new TMP-lite with SDF rendering but fewer features, that is not at all documented anywhere.

    The good part of this is that it means you can use this new UI package without having terrible pixellated fonts, which is what my main worry was. The bad part is you can't edit the shaders it uses, or assign your own materials, do rich styling, and so on. I guess for a lot of folks that's a reasonable trade. But really, it should be documented - this is no longer an optional package, it's a built in part of the LTS branch.
     
    DungDajHjep, awesomedata and JesOb like this.
  20. bfoddy

    bfoddy

    Joined:
    Mar 27, 2012
    Posts:
    85
    For example: upload_2022-6-2_11-31-54.png
     
  21. Ofx360

    Ofx360

    Joined:
    Apr 30, 2013
    Posts:
    155
    So two years ago, on the initial post, it was said that the Input System compatibility was going to be added in an upcoming version...is it in? I've been attempting to use the input system directly, that didn't work. I've tried the UI Input Module (a unity dev in some thread somewhere in the forums said it was a temp solution), that didn't work. So i guess I'm out of built-in options?

    Am I missing something? It's been two years so i figured something around navigating with the input system would be in by now. If nothing is in, were there any updates on when we can expect that to come thru?
     
    awesomedata likes this.
  22. Ofx360

    Ofx360

    Joined:
    Apr 30, 2013
    Posts:
    155
    upload_2022-6-27_10-19-58.png

    Also, what's the difference between Font and Font Asset in the UI Builder Inspector? Font doesn't even seem to work...I'm guessing Font is some legacy thing that isn't used anymore?

    upload_2022-6-27_10-18-42.png

    Though, the documents don't have anything on a Font Asset either

    Edit:

    Nvm, i found something...

    upload_2022-6-27_10-21-56.png

    This only has Font as an option so i guess that's the one we're supposed to be using? But it literally does nothing for me. I have to use Font Asset for the text to change at all? I'm guessing this is out dated because it's missing the Font Asset option...

    Edit2: Oh ok, after actually reading the bottom of the page in the doc, i guess Font might get disabled after it detects that you have TMPro installed
     
    Last edited: Jun 27, 2022
  23. mullenator

    mullenator

    Joined:
    Jun 30, 2022
    Posts:
    5
    Hi there, I'm working with a team that is using Unity 2020.3.23f1. When I installed the latest UI Builder and UI Toolkit packages (1.0.0-preview.18) from package manager, I am getting obsolete code errors in the Console window for BuilderInspectorAttributes.cs (adding screenshots below). I'm apprehensive about changing any of the package's in-house code and we aren't able to update to a later Unity version at this time in development.

    Any help or advice on resolving the following errors would be most appreciated. Thanks!

    Library/PackageCache/com.unity.ui.builder@1.0.0-preview.18/Editor/Builder/Inspector/BuilderInspectorAttributes.cs(261,28): error CS0618: 'ScrollView.showHorizontal' is obsolete: 'showHorizontal is obsolete. Use horizontalScrollerVisibility instead'

    Library/PackageCache/com.unity.ui.builder@1.0.0-preview.18/Editor/Builder/Inspector/BuilderInspectorAttributes.cs(270,28): error CS0618: 'ScrollView.showVertical' is obsolete: 'showVertical is obsolete. Use verticalScrollerVisibility instead'
     

    Attached Files:

  24. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,115
    unity packages will work with certain unity versions. Usually there is info showing what minimum version of unity a particular package supports, but can't seem to find it in this case. If you check this page

    https://docs.unity3d.com/2020.1/Documentation/Manual/UITK-package.html

    there is a big note there

    Code (CSharp):
    1. Preview versions of com.unity.ui might contain features that are not stable or final. Avoid using preview versions in production.
    So maybe try installing previous versions of this package till you find one that works with your unity version
     
    mullenator likes this.
  25. mullenator

    mullenator

    Joined:
    Jun 30, 2022
    Posts:
    5
    Thank you for the suggestion @dorusoftware, I'll give it a shot. Hopefully one of the previous versions will compile without errors right out of the box.

    UPDATE:

    I uninstalled the latest preview versions in the package manager for both UI Builder & UI Toolkit and then I started going backwards in versions. Luckily I am now not seeing any errors or warnings when I go back to UI Builder version 1.0.0-preview.16.

    I only installed the UI Toolkit package before because for the latest UI Builder version it was giving me a warning: Your Project is not configured to support UI Toolkit runtime UI. To enable runtime support, install the UI Toolkit package. But with the older version mentioned above it looks like I can use UI Builder without downloading the UI Toolkit package, so I will use that for the time being.

    Thanks for your help!

    UPDATE #2:

    It looks like preview versions 16 and 15 had a bug where selecting objects in the Hierarchy didn't show the editable parameters for the UI element in the Inspector. I downgraded further to version 1.0.0-preview.14 and now the editable parameters are back.
     
    Last edited: Jan 18, 2023
  26. Misnomer

    Misnomer

    Joined:
    Jul 15, 2013
    Posts:
    28
    I am having exactly this bug in 18th preview which is claimed to be fixed in 17th preview version:
    Fixed corrupted text after upgrading/removing/adding a new package. (case 1358577)
    I am using it with Unity 2020.3.48f1. Could this be the reason why it reproduces? And are there any ways to fix it myself?
     
  27. JuliaP_Unity

    JuliaP_Unity

    Unity Technologies

    Joined:
    Mar 26, 2020
    Posts:
    700
    If you really need to be on Unity 2020.3, then as long as you don't modify the packages you'll be good. A "reimport all" on the assets should settle whatever bugged state you find yourself in.

    However, we highly recommend moving to more recent versions of Unity, especially since 2020.3 LTS is not even being maintained anymore. With newer versions you don't need the package and there are lots of improvements that happened after the package stopped being released :)
     
    Misnomer likes this.
  28. Misnomer

    Misnomer

    Joined:
    Jul 15, 2013
    Posts:
    28
    thanks for the reply! I know it's not maintained it's just that I want my package to be available for as many Unity versions as possible.