I have an incredibly simple goal of changing the z-order of the buttons as the player scrolls down a menu. Each button as a select animation that changes its scale so they can see which one is selected.
Changing the z-order doesn’t do anything, which makes me wonder why its even a public variable. I’ve found many results suggesting to delete the widget and create it again right away. For me, this doesn’t work because the are children to a sub canvas panel, so when they are created and added again to the canvas their position is set to (0,0).
I tried save the render transform, but there is no way of changing the render transform of a widget, but you can set its position, however, you can’t get the position from another widget. You can, however, get the translation of it, but first of all that’s not nearly the same and its going to change anyways in the animations that I use that change its translation, and second its still doesn’t work, it still appears at (0,0).
This is a very simple feature and I am baffled that this isn’t implemented, and the work around are intuitive and convoluted.
Edit:
Finally got it working. This is what I had to do:
But I find it interesting that this is how you create something that should be just as simple as this:
Of course I’m going to turn this into a function library and call it something like “bring to front,” but this should already come standard and/or have the z-order changeable at runtime.
Terms like “move back, move forward, send to back, bring to forward” are all industry standard terms and are what I would expect to use to do this, so if the feature is here, but called something different, it might as well not be there at all, as searching for this is very hard.