当前位置:网站首页>Unity使用UGUI设置一个简单多级水平方向下拉菜单(不需要代码)
Unity使用UGUI设置一个简单多级水平方向下拉菜单(不需要代码)
2022-07-02 13:11:00 【云小川】
参考:Unity使用UGUI设置一个简单多级下拉菜单(不需要代码)_Y-Jin heart的博客-CSDN博客
需要对这些unity 组件有所了解:对ScrollRect 、Mask 、Horizontal Layout Group Content Size Fitter GridLayoutGroup
效果图:
具体实现步骤:
1.创建Image当作父节点,给父节点 添加相应组件
2.创建空物体,为父节点子物体,添加相应组件
Child Controls Size:width打钩后子物体的框不可以自定义,只能与当前物体一样框,高同理
Child Force Expand:选中这个子物体自动扩张
下面的Content Size Fitter,必须挂载
3.创建 Toggle 控制显隐
4.创建 Itme 子物体 列表,我的Itme是多行,如果是子菜单,组件GridLayoutGroup换成Horizontal Layout Group
5.注意事项:因为上面的Horizontal Layout Group 是按照顺序来进行排序的
边栏推荐
- Vscode设置标签页多行显示
- Boot connection to impala database
- Aike AI frontier promotion (2.15)
- 华为云服务器安装mysqlb for mysqld.service failed because the control process exited with error code.See “sys
- Recommended practice sharing of Zhilian recruitment based on Nebula graph
- Vscade set multi line display of tab
- Yyds dry goods inventory hands-on teaching you to carry out the packaging and release of mofish Library (fishing Library)
- Leetcode -- number of palindromes
- 电脑设备打印机驱动安装失败如何解决
- Bone conduction non ear Bluetooth headset brand, bone conduction Bluetooth headset brand recommendation
猜你喜欢
做机器视觉哪个软件好?
Dimension table and fact table in data warehouse
OSPF - route aggregation [(summary) including configuration commands] | address summary calculation method - detailed explanation
[5g NR] RRC connection release
TypeScript数组乱序输出
JS learning notes - process control
一文读懂AGV的关键技术——激光SLAM与视觉SLAM的区别
处理gzip: stdin: not in gzip formattar: Child returned status 1tar: Error is not recoverable: exitin
Foreign enterprise executives, continuous entrepreneurs, yoga and skiing masters, and a program life of continuous iteration and reconstruction
Some problems about MySQL installation
随机推荐
月报总结|Moonbeam6月份大事一览
day4
Yyds dry inventory company stipulates that all interfaces use post requests. Why?
台积电全球员工薪酬中位数约46万,CEO约899万;苹果上调日本的 iPhone 售价 ;Vim 9.0 发布|极客头条...
JS learning notes - variables
False summer vacation
绝对真理和相对真理思考
Everyone Xinfu builds: a one-stop intelligent business credit service platform
电脑管理员权限在哪里可以打开
【5G NR】RRC连接释放
Invalid bound statement (not found) solution summary
去除router-link中的下划线
Set the background picture in the idea (ultra detailed)
Summary | three coordinate systems in machine vision and their relationships
TypeScript数组乱序输出
JS learning notes - first acquaintance
2022最新最详细必成功的在Vscode中设置背景图、同时解决不受支持的问题
Remove the underline in router link
JS learning notes - process control
Vscade set multi line display of tab