下拉列表有时会因画布层级被其它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!! Unity Dropdown下拉列表因Canvas SortingLayer被遮挡

 

解决方法:

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

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

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

 

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

 

 

相关文章: