您当前的位置: 首页 >  unity

Peter_Gao_

暂无认证

  • 0浏览

    0关注

    621博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

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

Peter_Gao_ 发布时间:2020-11-02 10:28:26 ,浏览量:0

下拉列表有时会因画布层级被其它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

 

 

关注
打赏
1664521772
查看更多评论
立即登录/注册

微信扫码登录

0.0522s