Why transform.SetAsLastSibling () does not work?
I designed a result panel to show game result after a round is finished. On this panel, I added a BringToFront component which use the above function OnEnable(). Unfortunately it does not work as I expected.
I have some prefabs that were set on sorting layer "top layer", and the parent panel for these prefabs are set to "middle layer" of the sorting layer. For the result panel, I can't set sorting layers, so I created a layer which is call "toplayer".
My questions are: 1. why the above BringToFront component does not work? 2. What's the relationship between sorting layer and layer? Is it one prior than the other? It seems like not all game object can set up sorting layers, which seems to me clearer to understand the display relationships.
Please help! Thanks a lot!!!
Your answer
Follow this Question
Related Questions
I want to 2d sprite sort layers but force some of them to render in front of another layer? 0 Answers
How to make UI elements behind game objects without using World Space Canavas 0 Answers
Show objects in display, but not in VR 0 Answers
Sprite Renderer - Sorting Layers not appearing. 1 Answer
Sort character over and under a tree 2D 2 Answers