- Home /
Layering Instantiated UI elements in Hierarchy
I have UI elements that are spawned in and range from 3 - 8 different UI elements. These need to be in a specific order in the Hierarchy so they are layered correctly. How do i rearrange the Hierarchy in game so that the elements appear in correct order.
Thanks
Answer by Fir3stormStudio · Dec 09, 2016 at 07:17 AM
Im guessing this cant be done or no one really knows how to do it? The only way I can think of is have a layering system of empty gameobjects and spawn the UI i need in that layer to that gameobject. I was hoping for a cleaner solution
Answer by johnsietsma · Dec 12, 2016 at 10:29 PM
There are a few functions in Transform which let you change the order via code:
SetSiblingIndex()
SetAsFirstSibling()
SetAsLastSibling()
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Cronómetro 1 Answer
FPS UI ammo display problem 0 Answers
How to use the new Dropdown Menu? 2 Answers