Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

Feature Request Transform USS properties

Discussion in 'UI Toolkit' started by Catsoft-Studios, Feb 21, 2021.

  1. Catsoft-Studios

    Catsoft-Studios

    Joined:
    Jan 15, 2011
    Posts:
    668
    I've been working for the past year with UI Toolkit (for Editor tools) and it's a huge step forward. However, one things that I've been missing is the ability to change the scale of Visual Elements.

    Here's an example of why it would be useful:

    Imagine we have a toggle button that when clicked, it expands/collapses its content.

    expand.png

    Right now, what I'm doing is to change the DisplayStyle to DisplayStyle.Flex or DisplaySyle.None depending on the previous state. However, it would be much smoother if the content would slide up/down, using the scheduler and changing the scaleY from 0 to 1 and vice-versa over the course of time.

    Using the height is not possible because the content is dynamic so there's no way to know the amount of pixels it occupies.

    I understand rotation and skewing is pretty much unnecessary, but the scale would be pretty in a fairly large number of cases. Do you have any plans to include this? Thanks!
     
  2. MousePods

    MousePods

    Joined:
    Jul 19, 2012
    Posts:
    443
  3. Catsoft-Studios

    Catsoft-Studios

    Joined:
    Jan 15, 2011
    Posts:
    668
    Thanks!
     
    MousePods likes this.
unityunity