当前位置:网站首页>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 是按照顺序来进行排序的
边栏推荐
- Yyds dry inventory company stipulates that all interfaces use post requests. Why?
- Boot 事务使用
- Recalling the college entrance examination and becoming a programmer, do you regret it?
- 处理gzip: stdin: not in gzip formattar: Child returned status 1tar: Error is not recoverable: exitin
- idea jar包冲突排查
- Practice of constructing ten billion relationship knowledge map based on Nebula graph
- Yyds dry goods inventory student attendance system based on QT design
- Invalid bound statement (not found)解决方法总结
- 外企高管、连续创业者、瑜伽和滑雪高手,持续迭代重构的程序人生
- 虚假的暑假
猜你喜欢
[Yu Yue education] reference materials of sensing and intelligent control technology of Nanjing University of Technology
Which software is good for machine vision?
Recommended practice sharing of Zhilian recruitment based on Nebula graph
一文读懂AGV的关键技术——激光SLAM与视觉SLAM的区别
win10系统升级一段时间后,内存占用过高
Yyds dry inventory company stipulates that all interfaces use post requests. Why?
Today in history: Alipay launched barcode payment; The father of time-sharing system was born; The first TV advertisement in the world
Mathematical analysis_ Notes_ Chapter 5: univariate differential calculus
How to use stustr function in Oracle view
Some problems about MySQL installation
随机推荐
HMS core machine learning service helps zaful users to shop conveniently
月报总结|Moonbeam6月份大事一览
[fluent] dart data type number type (DART file creation | num type | int type | double type | num related API)
Idea jar package conflict troubleshooting
AWS云主机扩容
Win11应用商店无法加载页面怎么办?Win11商店无法加载页面
[fluent] dart language (DART language features | JIT instant compilation | AOT static compilation)
Idea public method extraction shortcut key
潘多拉 IOT 开发板学习(RT-Thread)—— 实验2 RGB LED 实验(学习笔记)
触发器:Mysql实现一张表添加或删除一条数据,另一张表同时添加
解决** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the defau
Yyds dry inventory KVM new inventory to expand space for home
Solve * * warning * *: your ApplicationContext is unlikely to start due to a @componentscan of the defau
Route service grid traffic through two-level gateway design
Invalid bound statement (not found) solution summary
Usage of group by
Best practices for building multi architecture images
day4
微信v3native支付设置的结束时间处理办法
绝对真理和相对真理思考