Render a VisualElement in front of others.

Hello, is there any way to make a VisualElement render in front of everything else, without having to essentially change the layout or do any other hacky things?

Hi TheHeftyCoder,

Currently the best way to achieve this is to call “BringToFront” on the VisualElement.

Hello, “BringToFront” changes the layout, since it’s reordering the children of the container. I needed that to implement a ReorderableList.I did solve my problem with “BringToFront”, position : absolute and a placeholder. I also needed to manually set the size of the element after the position was set to absolute (for dragging) and then revert it to a negative value so the layout would affect it again. [There may be a better way to do this in later Unity Versions, I’m currently using 2019.1, waiting for 2019.3 to release]

Thanks for the answer!

Hello, if i try this :
carte.experimental.animation.Scale( 2.5f ,800 ).Ease(Easing.OutBounce);
//carte.experimental.animation.Position(delta,800);
carte.parent.BringToFront();
it works.
if i try to add the animation.position , the object stays below
What is the problem, please ?