- Home /
Moving a UI panel in front of other UI elements without using sibling commands
Hello, I have a child panel that will be hidden behind other ui gameobjects that come after it in the hierarchy. I've read that using methods like SetAsLastSibling(), and SetAsFirstSibling(), can change the order in the hierarchy but the way my game is set up I can't change the order otherwise it will screw up the lists I have in place. So I'm wondering if there is any other possible way to get this panel in front of everything on the screen. (Changing 'Z' position or scale doesn't do anything either).
In the picture: The blue panel is supposed to act as a sort of dropdown panel for the parent gameobject, which is the object with the red X. The blue panel is being blocked by the other gameobjects that come after the parent gameobject in the hierarchy.
Answer by FortisVenaliter · Aug 03, 2017 at 08:34 PM
Don't make the blue panel a child of the red one.
Make it on it's own after the list in the hierarchy and share it between the buttons. They all use the same object as a drop down.
That way you'll save some memory, and it will always be on top. The downside is that you'll have to position it manually.
Your answer
Follow this Question
Related Questions
Canvas UI Priority layers 1 Answer
How to only allow one gameobject to enter a panel 1 Answer
Why are my UI elements hidden behind the background? 3 Answers
UI: Creating UI based on many strings 0 Answers
Divide UI in sections 0 Answers