问题
how can I show my ui elements on top of the others ?
http://prntscr.com/brjccg you can see the right side of the panel but the left one is under the map object. How can fix that i want to see both sides of it ?
Here's the components it currently has on http://prntscr.com/brjdab
回答1:
Unity renders UI from top to bottom. Anything you want on top should be placed at last in hierarchy. This only works with UI elements. To change rendering order between 2D Sprite
Objects and UI elements e.g Canvas, you can either change Order in Layer property of Sprite Renderer component or the same behaviour can be achieved by changing Sort Order property of Canvas. Object with greater value appears on top.
Note: You can also add new sorting layers using menu:
Edit > Project Settings > Tags and Layers
来源:https://stackoverflow.com/questions/38309945/how-to-show-ui-elements-on-top-unity