Search Unity

UIElements for Runtime and the UI Builder Unite Copenhagen 2019 Talk

Discussion in 'UIElements' started by uDamian, Oct 10, 2019.

  1. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    295
    Hi everyone. We recently gave a talk about UIElements for Runtime and the new UI Builder (visual authoring tool). Here's the recording for the talk:


    The example project from the talk will be available soon. We just need to first release the UIElements Runtime package first. That will be around the release of Unity 2019.3.
     
  2. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    868
    According to this timeline,

    does it mean, if i'm launching my game with 2020.1 then ill be using a production version of runtime element? (knowing that; this versison may not have all the controls which ugui have)

    Reason im asking this ill b launching a game around March/April and this is the same time 2020.1 will be launched. So if i could start using runtime ui then itb really great
     
  3. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    295
    We're actually aiming to have UIElements production ready by the end of 2020. We just didn't want to be too specific as to the exact 2020 version, hence the "during 2020" wording. That said, runtime will be available sooner in 2019.3 as a preview.

    While I wouldn't recommend shipping something with UIElements at runtime early 2020, it all depends on your requirements for your UI and your risk tolerance. I would at least wait for 2019.3 and try out the feature before making any commitments.
     
    jGate99 likes this.
  4. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    260
    There is already 2019.3 and 2020 in alpha and beta respectively so does the UIElement runtime available yet? At least alpha version we could include in our project
     
  5. Huijie-Cai

    Huijie-Cai

    Joined:
    Dec 5, 2014
    Posts:
    1
    does the UIElement runtime available yet? which version ?
     
  6. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    85
    Is there will be PanelRenderer component for DOTS from the start or we need to wait more for it?
     
  7. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    295
    As mentioned in the talk and the above post, the UIElements Runtime package (for support of UIElements at runtime) will be made public when Unity 2019.3 is fully released (so out of beta). That should be around mid-November.

    UI is difficult to implement in DOTS. For now, our aim is to be compatible with DOTS. This will not be done when we release the first version of the Panel Renderer though.
     
    Thaina likes this.
  8. e199

    e199

    Joined:
    Mar 24, 2015
    Posts:
    94
    Will you publish that project to show how to bind runtime data to UIElements?
     
  9. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    295
    As soon as the UIElements Runtime package is public, so will the Unite CPH 2019 demo project. :)
     
    e199 likes this.
  10. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    35
    I can't find PanelRenderer after i install ui builder. weird
     
  11. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,334
    Very good talk. I haven't tried the UIBuilder yet, but it looks good.

    I'm wondering how it will handle targetting child elements, such as code like this: ".class .child .green". When the buttons in the talk had their icons changed, the background-image was done inline, instead of using another class that could be done like this: '.toolbar-button .explosion', '.toolbar-button .quit' or whatever.

    If it doesn't support it, maybe it could be supported by making the class list a hierachy like the UXML view below it.

    About the class list, I assume you can click-drag more than one class onto an element and it will add on after everything else?

    Also, for animations, have you looked at anime.js? It allows tweening of each CSS parameter and keyframes in code.
     
    Last edited: Oct 15, 2019 at 10:19 PM
  12. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    85
    It is part of the future runtime package
     
  13. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    295
    That is definitely supported:
    upload_2019-10-16_11-48-27.png

    Correct.

    We can't run Javascript in Unity (anymore). But we're looking at a few options for the animation solution in UIElements.
     
    Stardog and jGate99 like this.
  14. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    868
    Hi @uDamian

    I built admin apps for games inside unity to reuse as much code as possible. This time i want to use UIElements (knowing thats its in preview and thats fine because admin app will be for in-house use only).

    As Runtime UI package is not available, so can i start implementing uis with UI Builder, and once Runtime available then will it automatically work OR will need a whole rewrite?

    Thanks
     
  15. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    295
    Yes, you can start building UI with the UI Builder and the C# UIElements API in the Editor and it should work at runtime once the package is available. You just have to be aware that some controls are Editor-only, like the ObjectField, or PropertyField. Right now you'll have to check the namespace of an element. If it's in the UnityEngine namespace, you're good.

    In general, the UI Builder just creates UXML and USS assets. These assets, along with the core and most of the UIElements API are used in the same way for both Editor and runtime. This was one of the primary goals of UIElements - to have one UI framework for both the Editor and Runtime.
     
    jGate99 likes this.
  16. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    868
    Thank you very much :)