Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

UI Roadmap

Discussion in 'UI Toolkit' started by benoitd_unity, Aug 27, 2019.

  1. OndrejP

    OndrejP

    Joined:
    Jul 19, 2017
    Posts:
    92
    Does this mean that Unity 2020.2 will use UI Elements for drawing default inspectors?
    Looking forward to that!
     
  2. Digika

    Digika

    Joined:
    Jan 7, 2018
    Posts:
    25
    Hopefully wont take 5 more years.
    Discord moved to grid completely today
     
    OndrejP likes this.
  3. OndrejP

    OndrejP

    Joined:
    Jul 19, 2017
    Posts:
    92
    I'd like to see grid as well, rather sooner than later.
     
  4. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    738
    It's pretty safe to assume a preview period for any package at this point, so I would say yes. We would want user input before we freeze the API in a full verified package.
     
    StephanieRowlinson likes this.
  5. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    738
    It's something we hope to get to but while 2020.2 is a reasonable target, it's a bit early to give an exact version we'll have this in by.

    All I can say is that grid layout is not off the table forever. It is something that keeps coming up so we know it's wanted but we really want to ship UIElements with flex-box layout first - so UIElements, as a whole, does not take 5 more years. :)
     
  6. heronww

    heronww

    Joined:
    Sep 8, 2019
    Posts:
    17
    I'm excited about UIElements, and am hoping the direction will embrace modern advancements in Blazor/Web Assembly since Unity itself is C# based. I'm curious if UIElements intends to embrace direct C# scripting as opposed to Javascript-type syntax which thankfully in the future web development may start to be moving away from? It seems Web Assembly is the future, and since Unity already uses C# it's a perfect opportunity to take advantage of Blazor or some similar native C# syntax as opposed to being influenced by a horrid language like JS. Just curious what the future plans are regarding this?
     
  7. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    738
    UIElements is 95% C#, with some low-level rendering and bindings code still written in C++ (Unity core). Unity itself dropped support for Javascript a long time ago so that wasn't even an option.

    Regarding use of web assembly and existing toolkits, UIElements is custom built for Unity and uses Unity's rendering systems to display itself. It needs to work with Unity types and interact well with other features of Unity.
     
    heronww likes this.
  8. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    189
    OndrejP, one_one and MechEthan like this.
  9. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    189
    MechEthan and jGate99 like this.
  10. kvfreedom

    kvfreedom

    Joined:
    Mar 30, 2015
    Posts:
    27
    I hope UI mask can support moving, rotating, scaling, nesting, semi-transparency, gradient, particles and 3D objects.
    23cff71c-4fda-4430-a6c2-1cd7513e3047_scaled.jpg QQ浏览器截图20191218111346.png
     
  11. MechEthan

    MechEthan

    Joined:
    Mar 23, 2016
    Posts:
    166
    This is very, very, stupidly-exciting for me.

    I spend a lot of time shoehorning uGUI into behaving -- I'm really looking forward to trying out the UIElements for Runtime!
     
    uDamian and benoitd_unity like this.
  12. Romeno

    Romeno

    Joined:
    Jun 24, 2013
    Posts:
    18
    Just a small suggestion. Please name your frameworks in a way any user can easily differentiate from the other frameworks you already developed. "Unity UI" is a synonym to Unity UI in general you know. "UIBuilder" or "UIElements" is a synonym any UI element. Something ridiculous but unambiguous like Squirrel, Orangutan or Salamander will do. Or any abbreviation like Super Mega Awesome New Unity UI - SMANU or whatever.
     
    jorditalespin, uDamian and one_one like this.
  13. efeb

    efeb

    Joined:
    Jul 9, 2018
    Posts:
    3
    It's not a new UI though, I thought this was an abstraction to "Unity UI"
     
  14. Romeno

    Romeno

    Joined:
    Jun 24, 2013
    Posts:
    18
    Its not an abstraction to "Unity UI". Its completely different UI system.
    Happy New Year btw.
     
    one_one likes this.
  15. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,052
    @benoitd_unity any plans for targetting RTL languages like Hebrew and Arabic
     
  16. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    189
    This has been put on hold momentarily while we integrate TextMesh Pro in UIElements. It will get back on the roadmap but I have no ETA.
     
    jGate99 likes this.
  17. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    381
    Yeah. Giving things unique names really helps when searching for information. Unity's recent naming habits have been infuriatingly vanilla.
     
  18. victorgallipoli

    victorgallipoli

    Joined:
    Aug 7, 2019
    Posts:
    1
    Any updates on when we can expect the UIElements Runtime?
     
  19. unity_zIYWJyNr2AiCPA

    unity_zIYWJyNr2AiCPA

    Joined:
    Jan 5, 2020
    Posts:
    9
    ^^^ Depth rendering anytime soon??
     
  20. OndrejP

    OndrejP

    Joined:
    Jul 19, 2017
    Posts:
    92
    This was confirmed for 2020.1, was there any change?
     
  21. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    189
    A preview package is still planned for 2020.1
     
    Sarkahn, Djayp and OndrejP like this.
  22. PassivePicasso

    PassivePicasso

    Joined:
    Sep 17, 2012
    Posts:
    85
    Will there be a unified data binding system, or is it going to be one way for editors and another for runtime?
     
  23. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    738
    Two things.
    1. SerializedObjects and SerializedProperties in the Editor (bindings in the Inspector window) will not go away anytime soon. As such, UIElements will continue to support the main Unity binding system.
    2. It's not set in stone yet, but there's no obvious reason right now why the new runtime bindings system that UIElements will use at runtime won't also work in the Editor. This means that the new system should be fairly unified across all UIE usage. That said, our priority will be first to make it work at runtime.
    3. Whichever bindings system you end up using, the way bindings are hooked up in UIElements will stay the same between them.
     
    Thaina likes this.
  24. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    591
    Please direct me on any docs about new UIToolkit binding system and if any way to create custom binders
     
  25. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    738
    UI Toolkit is just the new name for UIElements. All existing docs on bindings in UIElements still apply to UI Toolkit. :)
     
  26. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    591
    Most samples I can find is for editor, and it seems they all hardcoded into UIElements itself and have only one way for bind something.

    Is there Sample for creating our own binders that can work for runtime and bind to Properties, Methods and bind many aspects of element e.g. ant style line color, backcolor, bind with restrictions (min, max), bind event to method e.g. ButtonClick -> MyScript.OpenArsenal();
    bind to members that explicitly marked as eligible for bind e.g.
    Code (CSharp):
    1. [Bindable]
    2. Int32 BulletsCount { get{ ... } }
    etc.

    In short I have MVVM framework for Unity UI and want to find samples how can I port it to UIToolkit :)

    Can you direct me please?
     
  27. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    738
    UI Toolkit (formally named UIElements) does not currently have public APIs to let you define your own binding system. Also, the existing bindings system only supports binding of the
    value
    attribute on some fields. It does not support binding to arbitrary attributes or styles properties. Finally, the current bindings system only works in the Editor using SerializedObjects and SerializedProperties.

    We are working on a better solution as part of our plan to add bindings support to the Runtime (so not rely on SerializedObjects). But there's nothing you can build upon at the moment.

    With that all said, you don't need a binding system to implement your own binding system. All the basic APIs are already there. You just need to tap into UI Toolkit's Event system to know when fields have been changed by the user - and use your own binding system to tell you when to update the UI. You can implement this on top of the current APIs using your own C# Attributes (ie.
    [Bindable]
    ).
     
    Jes28 and one_one like this.
  28. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    591
    Thanks a lot :)

    Just a remark:
    As I understand you create new window for UI creation - UIBuilder and there you have your own inspector for UIElements
    In our BindingSystem we have custom inspector for BinderComponents to easily access bindable properties etc. So to create binding system with good usability we need a way to create custom UIElemets with custom Editors inside UIBuilder :)
     
  29. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    738
    Extending the UI Builder's own inspector is in the plan but will likely come after the release of UI Builder 1.0. We know it's an important feature though.
     
    Jes28 likes this.
  30. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    614
    I'm not sure how you guys decide on feature priorities, but I totally can't understand why Rich Text has been dropped again (it was in in 2018 as far as I'm aware) and now moved to 2020 LTS.
    I'm not aware of a single non-game app we developed over the last 10 years which has any sort of CMS for content which can get away with not having some elements in text bold or italic...
     
  31. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    189
    You're right it's very important and that's why we're making sure it's available in the first public release of the runtime package.
     
    fherbst, JoNax97 and one_one like this.
  32. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    400
    Will it also support emoji?
     
  33. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    614
    @benoitd_unity does "first public" mean the one that's scheduled for 2020.1, not for LTS as mentioned in the roadmap PDF? Curious because we're currently aligning tech on some larger projects throughout the year, so it's interesting wether evaluating Runtime UIElements is still on the table for that or not.
     
  34. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    189
    I'm referring to the Verified package that will release by end of year, which will have support for text tags.

    The one releasing for 2020.1 will have basic formatting, like Bold and Italic, applied to an element only.
     
    JoNax97 likes this.
  35. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    189
    I doubt it will in 2020.
     
    Thaina likes this.
  36. JoNax97

    JoNax97

    Joined:
    Feb 4, 2016
    Posts:
    319
    Hi! I wanted to know if the following features are planned:

    - Background-repeat control and interaction with 9-sliced backgrounds. Ideally I would need to control repeat/stretch over X and Y independently so the borders repeats in their axis and the center repeats in both.

    - Pixel-perfect font rendering. This is invaluable for pixelart fonts to display correctly

    Thanks a lot!
     
    Last edited: Mar 26, 2020
  37. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    189
    Also in the backlog, no timeline to share though.
    Text in the UI Toolkit is powered by TextMesh Pro and will support the Font Assets, which allow to generate bitmap fonts in addition to SDF. This should provide the desired effect.
     
  38. JoNax97

    JoNax97

    Joined:
    Feb 4, 2016
    Posts:
    319
    Is the support for TMP assets something we can expect in the short-ish term?
     
  39. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    189
    If not in the first drop, soon after it.
     
    JoNax97 likes this.
  40. rsodre

    rsodre

    Joined:
    May 9, 2012
    Posts:
    210
    I understand the UI Toolbox will be compatible with DOTS, and that's lovely.
    But will UGUI at some point be compatible with DOTS too?

    In a complex UI, how does UI Toolbox compares to UGUI in performance?
     
  41. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    189
    Very unlikely, we're no longer investing in UGUI.
    The team's goal is to make sure that the UI Tookit outperforms UGUI in the most common scenarios. The new layout engine and renderer combined with improved controls such as the ListView, should help making sure that no resources are needlessly spent on rendering UI.
     
    rsodre likes this.
  42. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    4,928
    "In all scenarios" would be even more useful.
     
  43. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    189
    Let's agree on In all common UI scenarios.

    The reason I'm cautious is that some people will always use a technology to build things it was not meant to, and we don't want to be held accountable for those scenarios as well.
     
  44. Sylmerria

    Sylmerria

    Joined:
    Jul 2, 2012
    Posts:
    276
    Hi guys,

    UIToolkit with DOTS support is for 20.1, 20.2 or later? ( sorry if that already been asked)

    Waiting your work very hard ;)
     
  45. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    738
    It's for "or later". Definitely something that will come after the initial 1.0 release of the UI Toolkit package later this year.
     
    Sylmerria likes this.
  46. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    614
    > The reason I'm cautious is that some people will always use a technology to build things it was not meant to, and we don't want to be held accountable for those scenarios as well.

    @benoitd_unity that's an interesting thing to say as someone working for the engine that became big partly because people used it for things it was never meant for. Can you elaborate on that a bit? What is UIElements built for?
     
    bluescrn likes this.
  47. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    738
    I'll let @benoitd_unity answer what he meant specifically.

    But generally speaking, no one approach/tech/paradigm will solve all problems equally well. We decided to go with a Retained Mode UI system because, among other benefits, we think the problems Retained Mode UIs solve well are more frequent among Unity users than the problems they solve less well.

    Specifically, UI that changes _entirely_ every frame is seen less often in games compared to UI that has a lot of static parts. Most UI will not have the layout of buttons and labels constantly change so we can benefit from optimizing and redrawing only what needs to change.

    We will do our best to optimize UI Toolkit for the worst case (everything is changing every frame) but that's not our primary use case so for those cases, another solution specifically optimized for those cases might perform better. Hence, we cannot claim that UI Toolkit will _always_ be faster than every other solution/approach. That's just not realistic.
     
    Lurking-Ninja and JoNax97 like this.
  48. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    614
    Thanks for the reply, I totally understand the remark about performance and retained mode.

    But the sentence was more general than that, so this is what I'm curious about - it's a discussion that goes beyond UIElements, but a direction Unity is taking (not only with UIElements) that I'm very frightened of, as someone who has built a business on building cutting-edge stuff where a lot of people might say "this is not how the technology was meant to be used!". (yes, this goes a bit off-topic, please let me know what would be a better place to discuss this.)
     
  49. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    738
    This is getting a bit philosophical but this idea that a tool can be used for something other than what it was meant for applies to all tools, including the very
    > ...cutting-edge stuff where a lot of people might say "this is not how the technology was meant to be used!"
    What you build will also have use cases it was not designed for and may not perform as well as a different tool that was designed for those cases. This cannot be avoided.

    At Unity, we try to imagine and gather from users as many possible use cases as we can when we work on a feature. But then there are resource constraints and mutually exclusive requirements to contend with which means we will have to make choices that favor one use case over another.

    That said, to be clear, the message here is not:
    > Do not use this tool for X, Y, and Z because it was not designed for those use cases.

    The message is more like:
    > If you use this tool for X, Y, and Z, you might not get optimal results because it was not designed for those use cases. But we will do our best to help you successfully use it for X, Y, and Z, anyway.

    So, please do push our tools beyond their specs. We don't want you to stop doing that. We're just trying to manage expectations.
     
  50. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    4,928
    I look at current games and see scrolling lists that contain buttons with animated backgrounds, particles and nice transition effects while with that element is interacted. There are not so much static elements in there, I guess. These types of UI can be found in many mobile games actually.

    Is UI Toolkit designed/optimized to handle these cases, or would this not be one of the "most common scenarios"?
     
    Yozaro and fherbst like this.
unityunity