Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved UI Toolkit rotation and anchor

Discussion in 'UI Toolkit' started by dpGoose, Oct 22, 2021.

  1. dpGoose

    dpGoose

    Joined:
    Feb 12, 2017
    Posts:
    6
    I can rotate a VisualElement in code but would like to know if it is possible to rotate it using a style without code. Also is it possible to change the anchor point for rotation?
     
  2. MousePods

    MousePods

    Joined:
    Jul 19, 2012
    Posts:
    808
    This should help.

    Screen Shot 2021-10-22 at 4.16.15 PM.png
     
  3. dpGoose

    dpGoose

    Joined:
    Feb 12, 2017
    Posts:
    6
    Thanks but where is that panel? I am using UI Builder 1.0.0-preview.18 and cannot see any such panel. I have added a VisualElement to a UI Document.

    Perhaps I am using the worng tool. I am just exploring the UI Toolkit to see if it is a suitable replacement for my existing UI.
     
  4. Grumpy-Dot

    Grumpy-Dot

    Joined:
    Feb 29, 2016
    Posts:
    93
    It's almost at the bottom of the Inlined Styles. You can expand it using the arrow on the left.
    Screenshot_108.png
     
  5. dpGoose

    dpGoose

    Joined:
    Feb 12, 2017
    Posts:
    6
    It is not listed in the inspector. This is on 2021.1.15f1. What version are you running?
    upload_2021-10-25_6-51-5.png
     
  6. Grumpy-Dot

    Grumpy-Dot

    Joined:
    Feb 29, 2016
    Posts:
    93
    @dpGoose I am running the embedded version from Unity 2021.2.0b16. It has the most fixes and features.
     
  7. martinpa_unity

    martinpa_unity

    Unity Technologies

    Joined:
    Oct 18, 2017
    Posts:
    471
    The UI Builder is part of Unity directly starting 2021.1. The package version of the UI Builder will continue to receive bug fixes, but it won't receive new features.

    The best path forward is probably to wait until 2021.2 gets released, which will also have UI Toolkit runtime as part of Unity directly.

    Until then, you can achieve rotation through parenting + manipulating the transform property.
     
  8. dpGoose

    dpGoose

    Joined:
    Feb 12, 2017
    Posts:
    6
    Thank you! I have upgraded to the new 2021.2 and it's working perfectly.
     
  9. patrickjarnfelt

    patrickjarnfelt

    Joined:
    Jun 24, 2013
    Posts:
    28
    I am not seeting the tranform tab in neither Unity 2021.1.27f1 with UI Builder 1.0.0-preview.18 or in the newly release 2021.2.0f1. Am I missing something? Do you unluck it somehow?
     
  10. viktorcode

    viktorcode

    Joined:
    Jun 30, 2020
    Posts:
    23
    You should uninstall UI Builder package in Unity 2021.2. After that you'll be able to use built-in version
     
    Enrico-Monese likes this.
  11. patrickjarnfelt

    patrickjarnfelt

    Joined:
    Jun 24, 2013
    Posts:
    28
    That worked. Thank you!