当前位置:网站首页>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 是按照顺序来进行排序的 
边栏推荐
- 去除router-link中的下划线
- Pandora IOT development board learning (RT thread) - Experiment 2 RGB LED experiment (learning notes)
- Set the background picture in the idea (ultra detailed)
- 忆当年高考|成为程序员的你,后悔了吗?
- By asp Net core downloads files according to the path exception
- The difference and usage of calloc, malloc and realloc functions
- 关于mysql安装的一些问题
- How to use stustr function in Oracle view
- sim2real环境配置教程
- Recalling the college entrance examination and becoming a programmer, do you regret it?
猜你喜欢

做机器视觉哪个软件好?

Everyone Xinfu builds: a one-stop intelligent business credit service platform

Compress words (kmp/ string hash, double hash)

数据安全产业系列沙龙(三)| 数据安全产业标准体系建设主题沙龙

sim2real环境配置教程

Memory alignment of structure

Yyds dry inventory method of deleting expired documents in batch

mysql 计算经纬度范围内的数据

idea jar包冲突排查

数学分析_笔记_第5章:一元微分学
随机推荐
注册成为harmonyos开发者并安装DevEco Studio 3.0 Beta2 for HarmonyOS
2020.4.12 byte written test questions B DP D monotone stack
What are the necessary functions of short video app development?
台积电全球员工薪酬中位数约46万,CEO约899万;苹果上调日本的 iPhone 售价 ;Vim 9.0 发布|极客头条...
Idea jar package conflict troubleshooting
Does bone conduction earphone have external sound? Advantages of bone conduction earphones
Recalling the college entrance examination and becoming a programmer, do you regret it?
2022最新最详细必成功的在Vscode中设置背景图、同时解决不受支持的问题
PyC file decompile
Solve * * warning * *: your ApplicationContext is unlikely to start due to a @componentscan of the defau
Effectively use keywords to increase Amazon sales
Route service grid traffic through two-level gateway design
Armv8-a programming guide MMU (4)
云原生的 CICD 框架:Tekton
Flink real-time data warehouse (7): Flink realizes the full pull module to extract data in MySQL
After the win10 system is upgraded for a period of time, the memory occupation is too high
请问怎么在oracle视图中使用stustr函数
mysql数据库mysqldump为啥没有创建数据库的语句
JS learning notes - process control
Classifier visual interpretation stylex: Google, MIT, etc. have found the key attributes that affect image classification