Unity Dropdown下拉列表因Canvas SortingLayer被遮挡

下拉列表有时会因画布层级被其它UI遮挡:

 I've got a Canvas which has its Render Mode set to World Space.
Within this canvas, I have a Dropdown (from the new UI tools).
The problem is, the content of this dropdown appears behind other elements in my scene. In the screenshot, you'll see it appears behind the canvas' background...
If I add other elements to the scene, such as a background - NOT in the canvas, but on a background sorting layer - the dropdown list appears behind that too...
Not sure what else to try... I've tried setting sorting layers but I can't find a way to set the sorting layer of the dropdown list...
If I'm in Play mode, I can see the "Dropdown List" appear in the Hierarchy, and if I modify the sorting layer to my UI layer, the list shows up fine. But of course, I can't save this during Play mode, and once I exit Playmode, I lost the ability to edit the Dropdown List.
Any ideas? Thanks!! :)

 

解决方法:

 add a Canvas to your Template game object of your Dropdowns with the wanted sorting layer it works like a charm!

在Template上新添加一个画布并设置所需要的SortingLayer

 

https://forum.unity.com/threads/dropdown-list-appears-behind-everything.356750/#post-2415566

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值