unity ngui UIPanel和UIWidget做为容器使用时的区别

2025-05-19 19:19:49
推荐回答(1个)
回答1:

1.UIPanel会产生drawcall,而widget不会,widget依赖于父节点来产生drawcall
2. panel有裁切区域,widget没有
3.当panel有裁切区域,Anchors对齐功能才可用,widget不用
4.widget下的depth没用,会按它的父panel的depth算,panel下的depth就是自己的