UIBuilder: Reordering in Hierarchy or Viewport not working

When I add anything I cannot seem to reorder it so I cannot add a Label and then move it above the new task TextField
I see @garypettie gets a line to move it to but I just see blocks and can only move to with in other objects…
Cannot move in the Viewport either…
Wonder if I’ve mucked up a setting somewhere?
Annoying
Unity 21.1.26…

[EDIT]
Instead of adding a new Label field I changed the Flex direction of the TextField so its label is on top…

That’s weird. I don’t think I ever came across a problem moving stuff around in the viewport AND the hierarchy. The viewport can be a bit temperamental, which is why I favor moving things in the hierarchy.

I did find a lot of weird bugs in the UIToolkit though, so this might just be another one. Did saving and reopening things help at all?

The way you solved the problem will work for now but you may run into some headaches when we start adding more styling later on. It shouldn’t cause any major problems though.

While that is one way of doing it, though I would argue it’s probably not the right one. :slight_smile: While reordering can be tricky, I’ve found you have to watch very carefully when moving an element to the top of a container like a VisualElement. The tiny blue line should be just above the item you want to move the element above. If you don’t see a blue line, the item will drop inside the highlighted container. If the whole space turns blue, it will be added to the end of the heirarchy at the top. I think with practice, you’ll start nailing it.
I would argue that this is one of the weaker features of the UIBuilder.

I was not just not getting that tiny blue line that I was expecting
Just fully highlighted containers
Dont know why.

Somewhere along the way I’ve recently swapped to a Dark theme Unity and now it is easy to see the thin blue line I was expecting to see before and moving is easy!

In the Light theme it was very hard/impossible for me to see that line…

1 Like

I’ll be honest, I switched the second Unity made it avaliable to us free users. Light themes destroy my eyes.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms