Search Unity

  1. Click here to receive a gift with your purchase of Unity Pro or Unity Enterprise.
    Dismiss Notice
  2. 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. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    234
    Hi everyone,

    We're finally ready to share our roadmap about UI. It is centred around UIElements and gives an overview of our vision for UI, what has been already shipped and what you can expect for next year.

    Please keep in mind that the content for each milestone is not set in stone and is subject to change. Your feedback at this stage is very important, and might actually steer the roadmap, so please let us know what you think.

    Cheers,

    Edit: Roadmap update for 2020
     

    Attached Files:

    Last edited: Dec 17, 2019
  2. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,199
    Thank you for sharing the roadmap.
    Is UIElements will get parity with uGUI by Unity 2020.3 too?
     
  3. StephanieRowlinson

    StephanieRowlinson

    Joined:
    Jul 23, 2014
    Posts:
    120
    I love how detailed this roadmap is! Great job, please do this for all features in future. ;)

    Some questions/remarks:

    - I see the DOTS features are slated for 2020.2, but the full feature set for 2020.3. As UI developer I'd prefer to get the full set of features first and then the DOTS versions of things I already have.

    - What's the difference between value and data binding?
     
  4. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    234
    Yes that's the objective.
     
    jGate99 likes this.
  5. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    234
    Oops, that slide was meant to be removed, exactly for the reasons you stated. Let me fix that.

    For the moment, we allow only the binding of the main value property of a Control, like the
    text
    property of the Label type for example.

    Data Binding would allow you to bind more properties. We're considering expanding the system to USS properties.
     
  6. StephanieRowlinson

    StephanieRowlinson

    Joined:
    Jul 23, 2014
    Posts:
    120
    Data Binding's where it's at then!

    With regards to expanding it to USS properties. I haven't had time to dig into the new framework yet (was kind of waiting on the runtime version to do that), but one type of binding from styles to controls that I really like WPF and would love to have an equivalent of is the TemplateBinding. This binding used in styles basically means "this property can be overridden by each control that uses the style as needed". If you don't specify anything in the control itself the value set in the style will instead be used. So for example:

    Code (CSharp):
    1.    <Style TargetType="{x:Type Label}">
    2.             <Setter Property="SnapsToDevicePixels" Value="True"/>
    3.             <Setter Property="FontSize" Value="14"/>
    4.             <Setter Property="Template">
    5.                 <Setter.Value>
    6.                     <ControlTemplate TargetType="Label">
    7.                         <Border>
    8.                             <ContentPresenter HorizontalAlignment="Center"                                            
    9.                                               VerticalAlignment="Center"
    10.                                               TextBlock.FontFamily="/Views/Fonts/calibri.ttf#Calibri"
    11.                                               TextBlock.FontSize="{TemplateBinding FontSize}"
    12.                                               />
    13.                         </Border>
    14.                     </ControlTemplate>
    15.                 </Setter.Value>
    16.             </Setter>
    17.         </Style>
    Which in this case means each label default has the size 14, but you can overwrite it if needed. This greatly reduces the amount of almost identical styles you need to write for common and small deviations.

    Just binding to stuff in the ViewModel/Model/you know the code bit from the USS, would also be super welcome.
     
  7. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    234
    If I get what you mean, USS style sheets should behave in a similar fashion, with styles being applied based on the precedence rules of selectors.
     
    StephanieRowlinson likes this.
  8. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    511
    Thank you for the roadmap!

    Would be lovely to have some form of SVG antialiasing in screen space overlay for Unity UI or in runtime UIElements. Since SVGs only get antialiasing in forward pipelines or in Screen Space Camera, we currently don't get SVG antialiasing in:

    1. Screen Space Overlay UIs.
    2. Any deferred pipelines, for example built-in or HDRP deferred. Any post-process AA blurs fonts.

    We can get crisp, truly resolution independent UIs in Unity (UIElements and Unity UI) if this could get addressed.
     
    mandisaw and benoitd_unity like this.
  9. oltranzista

    oltranzista

    Joined:
    Jul 21, 2015
    Posts:
    4
    Where will it be announced when the Runtime UI Preview Package becomes available?
     
    mandisaw, Ziplock9000 and jGate99 like this.
  10. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    572
    I'm bit confusing that there are so many packages.

    UIElements for Editor Extensions
    UIElements for Runtime
    Simple Runtime UI
    Rich Content UI

    Does these packages means same updates of UIElements? or separated packages?
     
  11. Le_Tai

    Le_Tai

    Joined:
    Jun 20, 2014
    Posts:
    382
    So does this mean UIElement will completely replace uGUI? If that is the case, will it be possible to extend the low-level rendering system of UIElement - like building custom mesh and using custom shader?
     
  12. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,021
  13. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,021
    These are just updates to UIElements, not necessarily individual packages. Either way, the final state will be fairly plug-and-play, even if it's split between multiple packages. Unity will manage these packages for you via default packages, including updates.

    To be more specific:
    UIElements for Editor Extensions is not a package. This is all in core Unity already.
    UIElements for Runtime is and will likely stay a separate package but may become default when it comes out of preview
    Simple Runtime UI and Rich Content UI are just capability goals (that span over all UIElements), not packages.
     
    mandisaw, engzs and Kichang-Kim like this.
  14. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,021
    Should be when 2019.3 ships, so around early November.
     
  15. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    234
    The team is working on something regarding antialiasing for Screen Space UI. Will update the roadmap once we have an ETA.
     
    MechEthan and Korindian like this.
  16. NotGoodEnoughh

    NotGoodEnoughh

    Joined:
    Feb 1, 2018
    Posts:
    35
    Hello! Can you say me how can I draw a table using UIElements?
    I saw a TreeView in UXML ref, but I can't find any helpful examples of its usage.
     
  17. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,021
    Please start a separate thread. This thread is just about general roadmap questions.
     
  18. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    511
    Great! Many thanks to the UI team for working on this.
     
  19. Le_Tai

    Le_Tai

    Joined:
    Jun 20, 2014
    Posts:
    382
    I love the direction you are heading.

    Please also add the option to pass more UV channels to UIElements.Vertex. Otherwise what can be done with custom shader would be severely limited.

    Also, can we expect UI shaders to work in any render pipeline, as it currently is?
     
  20. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,199
    And hopefully shaders created with Shader Graph, please say yes?
     
  21. NotGoodEnoughh

    NotGoodEnoughh

    Joined:
    Feb 1, 2018
    Posts:
    35
    I'm sorry, I forgot that this is the UI Roadmap
     
    Last edited: Sep 10, 2019
    benoitd_unity likes this.
  22. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,021
    With custom shaders it would be up to you which shader you used, how you create it, and which pipeline it will work. But it's a bit early to discuss details on custom shaders at this time. Just wanted to say that it is planned.
     
    Le_Tai likes this.
  23. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    621
    Hi. I have feature request and question.
    1) I hope UIElements for Runtime using in game UI can generate UI sprite atlas dynamically at runtime and make the UI always strike to become 1 draw call based on what is loaded inside the UI. I have the use case that I need to load a few of different UI icons based on condition meaning that I not able to generate static sprite atlas as I have a lot of UI icons that not able to combine with other UI to make it as 1 draw call.

    2) I see DOTS UI - 2020.1 has been removed. Does it means I cannot get DOTS UI preview package at 2020.1 cycle anymore? I still hope I can get DOTS UI Runtime support as soon as possible as I want to start using DOTS soon. Currrently DOTS UI is one of the big blocker in DOTS development workflow.
     
    jGate99 likes this.
  24. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    234
    Yes the UIElements UI Renderer does a lot of work to ensure the UI renders very few draw calls, and can achieve using only 1 draw call in most cases. It does support dynamic atlas generation at runtime, but currently has some limitations: Only works with textures that are 64x64 and limited wrap mode. We will keep improving the UIR and loosen the restrictions over time.

    Yes we had to de-prioritize it in order to secure the release of UIElements for game UI. Meanwhile, we're still looking at how we could provide a good DOTS UI solution. What is currently blocking you? What is your use case?
     
  25. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    556
    Quick question about the runtime preview: Will this already be included in the beta version for 2019.3 at some point?
     
    optimise, labandunga and jGate99 like this.
  26. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,021
    The plan is to release the preview of the UIElements Runtime package around the same time 2019.3 releases. You'll still have to install the package yourself, so it won't be "included in" 2019.3.
     
    labandunga, one_one and optimise like this.
  27. labandunga

    labandunga

    Joined:
    Aug 1, 2012
    Posts:
    29
    Is the ListView recycling ListItems? If not, is that on the roadmap? Also I would love to know more about StackPanel and Grid like elements
     
  28. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,021
    Yes, the ListView does recycle VisualElements. It only creates enough to cover the area you can see and then it rebinds elements as the user scrolls. This is why the ListView (for now) requires knowing the item heights (and requires the item heights to be the same for all items).

    For GridView, if you will, you'll have to wait a bit longer. We working on getting TreeView out and GridView should follow shortly after.
     
    Exanite, MechEthan, mandisaw and 3 others like this.
  29. JakHussain

    JakHussain

    Joined:
    Oct 20, 2016
    Posts:
    318
    This is such great news. My company have a Web development team and they generate their ccs styling needed for a website from their story boards. What I want to know is what the breakdown in differences between uss and css are so that were can write a converter and reuse the same css from their Web dev in our unity apps for consistent company wide styling.

    Will this be possible and would unity be providing a converter or would we need to write our own?
     
  30. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,021
    If you use Unity 2019.2 and import a CSS file (and change the extension to .uss), you should see a list of warnings for all the properties that USS does not support. In some cases, you'll also get a suggestion for an alternative property. USS is a strict subset of CSS, meaning it's just missing some of the more advanced CSS features (like media queries and animation transitions).
     
  31. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    621
    Awesome. My another concern is does it currently allows UI designer to design UI in whatever ways like using a lot of masking but UIElements for game UI still able to convert optimal performance UI at runtime? The idea is like DOTS that modify game objects at authoring and converting to entities at runtime to achieve optimal performance.

    I assume UIElements for game UI will still using Monobehavior to get UIElements Components like Button to add listener to fire event when button on click to and Text to output game state such as health then I still need to fix some hacks and workarounds to bridge it nicely between Monobehavior land and DOTS lands which quite painful. Also I still didn't see any new improvement for DOTS Reactive System anymore that I think it's essential feature for DOTS UIElements for game UI. Currently seems like there's no nice API to detect reactive data changes of the components. It's using system state component but the core idea is still add/remove component to implement the reactive logic and seems like there's no way to keep detecting data changes of the specific component in reactive way as you only can do add/remove component. There is long discussion about this topic. You can just jump to post #40 https://forum.unity.com/threads/reactive-system.522776/#post-4776161. At the end, I think the use cases are how to bind UI to any event and self event. Any event means if any of the entities that has specific component change data it will update the data such as any of entities that has score component changed its data it will update UI. Self event means only one entity with specific component change its data will update UI like health of player. Other entity with the same specific component change its data will never update UI.
     
    Last edited: Oct 1, 2019
  32. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,021
    Our new UI Renderer used for UIElements will do its best to optimize the UI hierarchy to get the best performance. Our aim is 1 draw call in most cases. However, some features of UIElements will inevitably incur a greater cost. Masking, by necessity, requires extra work which if used excessively will still case performance issues. It's just that now, with UIElements, the cost is less than it was before.

    UIElements for runtime uses a single Panel Renderer component (that contains your panel root element) on a GameObject, but otherwise elements (VisualElements) have no GameObject equivalent. Button in UIElements is its own object, not a component on a GameObject. In other words, the entire UI tree in UIElements is stored inside a single GameObject (or if we integrate with the DOTS world, a single Entity).

    As for binding the UI to data, both GameObject data or Entity data, we are still working on this topic. We are aware of its importance, especially for runtime UI.
     
    MechEthan, Ofx360, optimise and 2 others like this.
  33. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    556
    Are you planning a sort of MVVM approach for binding? And would it be possible to make binding attribute based, similar to the SerializeField attribute?
     
  34. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    463
    Hmm, I'm very curious how you plan on integrating particles/meshes into the hierarchy if the entire visual hierarchy is 1 entity. I know this hasn't been completed yet, but I saw that it was on the roadmap for 2020.3 which isn't too far away.
     
    kvfreedom likes this.
  35. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,021
    It's too early to comment on the exact implementation for bindings at runtime but attribute-based binding declaration is definitely something we're considering. This would also serve to simplify our current uxml-attribute declaration system.

    The current thinking is that you'll be able to link a UIElements element to a GameObject/Entity and have the element control its transform. The GameObject/Entity will be moved to always appear to be on top of the element driving it. The idea being that most elements won't need to be linked to a GameObject and so you can focus on just the ones that do.

    For having particles actually interact with the UI's geometry, like a button's border being a particle emitter, we will need to consider custom rendering hooks within the UI's renderer, similar to our current custom mesh support (
    VisualElement.generateVisualContent()
    ). But this feature is still in the air.
     
    mandisaw, one_one and Ferazel like this.
  36. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    556
    That would be amazing! Looking forward to updates on that topic - from my experience, the data pipeline can become quite the hassle if it requires a lot of boilerplate/manual wiring.
     
  37. Ziplock9000

    Ziplock9000

    Joined:
    Jan 26, 2016
    Posts:
    194
    I'm running 2019.3.0b5 and don't see anything relating to a runtime in-game version of UIElements in package manager.
    Did you mean when the final version of 2019.3 releases? Thanks.
     
    jGate99 likes this.
  38. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,021
    Correct. The runtime package will be exposed in the Package Manager around when 2019.3 actually releases.
     
  39. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,199
    Hi @uDamian,
    Is Project Tiny (upcoming update) will also be using UI Elements for UI?
     
  40. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,021
    No, it will not. UIElements is not currently compatible with DOTS. This is still an area of investigation/development.
     
    jGate99 likes this.
  41. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    451
    @uDamian Then which class/namespace would be compatible for making UI in Tiny3D ?

    Would it be reuse the current UI in Tiny2D ?
     
  42. krassemanne

    krassemanne

    Joined:
    Jun 27, 2015
    Posts:
    8
    Do you know if z-index is going to be supported?
     
    PassivePicasso likes this.
  43. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,021
    Eventually, yes. But it's not a near-term priority.
     
    krassemanne likes this.
  44. PassivePicasso

    PassivePicasso

    Joined:
    Sep 17, 2012
    Posts:
    88
    Are there any plans to allow getting screen space coordinates of controls in a panel?
    Or alternatively rebuilding the PopupWindow UIElement so it actually provides a popup rather than just a styled element?
     
  45. jwheeler_unity

    jwheeler_unity

    Unity Technologies

    Joined:
    Nov 2, 2018
    Posts:
    6
    Excellent roadmap. I've definitely got my eyes on runtime data binding!
     
    Exanite and one_one like this.
  46. Digika

    Digika

    Joined:
    Jan 7, 2018
    Posts:
    94
    Any plans to add Grid? It is pretty common misconception that flex can do everything, a lot of stuff in Grid is more robust and intuitive. I understand you wanted to make it easier for html/mobile exporting in future but Grid existed since 2007 in some form and nowadays mobile browsers support it too. There is 0 reason to limit css subset to flex in 2019.
     
    MechEthan and JakHussain like this.
  47. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,021
    It's on our list but we currently have higher priorities so it will likely not be in the initial production release.
     
    one_one likes this.
  48. perholmes

    perholmes

    Joined:
    Dec 29, 2017
    Posts:
    62
    Hi,

    Any updates on when the UI Renderer for Runtime will be available? I don't care if it's even just an alpha version, I'm testing whether a particular project can be done in Unity at all based on this. I'm years away from production code, and to me, it doesn't matter how buggy the Panel Renderer preview is, as long as I can install it and validate the basic concept.

    I've installed 2019.3.0b10 and 2020.1.0a11, and I'm not seeing anything. What is the name of the package I should be looking for?

    Since you had this working in the Copenhagen YouTube video from long ago, is there any particular reason you're holding this back for so long, even just a pre-alpha? This seems perfectly suitable for testing, and I'm kind of stuck without being able to answer the question about whether it solves my problem.
     
  49. StephanieRowlinson

    StephanieRowlinson

    Joined:
    Jul 23, 2014
    Posts:
    120
    I'm looking at the roadmap again and runtime Databinding is slated for release in 2020.3 in the verified package. Will it get a preview before that or just drop fully formed in the 2020.3 package?
     
    jGate99 likes this.
  50. MechEthan

    MechEthan

    Joined:
    Mar 23, 2016
    Posts:
    166
    Around when 2019.3 exits beta and releases.

     
unityunity