UIElements USS Transform

I am looking to rotate a label -90 degrees and just started to really poke around the UIElements system. Is there a way to set rotation within the style sheet similar to css (In example: “transform: rotate(-90deg);”)?

I did get it working on the C# side via:

UnityEngine.UIElements.VisualElement label = new Label("Hello World! ");
label.transform.rotation = Quaternion.Euler(0, 0, -90);
label.transform.position = new Vector3(100, 100, 0);
rootVisualElement.Add(label);

I could not find anything that indicated that their was support for messing with the transform on the uss side of things (I’m using Unity 2019.3.15 currently).

3 Likes

Doesn’t seem like it, not yet.

2 Likes