Search Unity

USS Transitions?

Discussion in 'UI Toolkit' started by Rtyper, Mar 2, 2020.

  1. Rtyper

    Rtyper

    Joined:
    Aug 7, 2010
    Posts:
    452
    First off, I'm pretty pleased with using UIElements so far - it took a while to get started, and I'm still a long way off being as comfortable with it as with IMGUI, but I'm definitely starting to see its uses!

    I'm wondering if there's any plan to bring something like the CSS transition property to USS in the future? Right now, the only way to do animated hover states or something involves a fair bit of C# code, which a) is overkill for a minor addition to a UI, and b) breaks the nice separation of concerns UXML/USS/C# brings to an extent. Being able to just add
    transition: background-color 0.5s;
    to a USS selector would be amazing!

    Anyway, keep up the good work!
     
    tonytopper likes this.
  2. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    331
    Definitely on our radar to bring CSS Transition and CSS Animation to UIElements, for the reason you just described.
     
  3. Rtyper

    Rtyper

    Joined:
    Aug 7, 2010
    Posts:
    452
    Good to know!
     
  4. Siiseli92

    Siiseli92

    Joined:
    Nov 16, 2016
    Posts:
    6
    Is there any estimate on the expected timeline for this?
     
    Sylmerria and liuhuan0924 like this.
  5. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    331
    Tentatively end of 2021.
     
    Siiseli92 and billreynish like this.
  6. Siiseli92

    Siiseli92

    Joined:
    Nov 16, 2016
    Posts:
    6
    Thanks for the estimate :)
     
  7. tonytopper

    tonytopper

    Joined:
    Jun 25, 2018
    Posts:
    226
    As someone with lots of HTML/CSS experience, I am really excited to hear that this coming.

    Curious if this is still on track for a release this year. Can you use some of that IPO money to accelerate this? :D

    Seems like maturing UXML and USS for in-game UIs should be high on Unity's priority list to me.
     
    Midiphony and MousePods like this.
  8. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    331
    The team is still working very hard to make sure it will release in time :)
     
  9. DevViktoria

    DevViktoria

    Joined:
    Apr 6, 2021
    Posts:
    94
    Actually I just read the Unity 2021.2.0a20 release notes here https://unity3d.com/beta/2021.2a. It mentions in the
    New 2021.2.0a20 Entries since 2021.2.0a19 section that "UI Toolkit: Added transitions properties to UI Toolkit."
    Are these properties the CSS Transition properties mentioned in this thread?
     
    tonytopper likes this.
  10. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    486