How to show ui elements on top Unity

情到浓时终转凉″ 提交于 2019-12-12 01:48:43

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!