当前位置:网站首页>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 是按照顺序来进行排序的
边栏推荐
- After the win10 system is upgraded for a period of time, the memory occupation is too high
- mysql数据库mysqldump为啥没有创建数据库的语句
- End time processing method of wechat v3native payment settings
- 解决** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the defau
- Register as a harmonios developer and install deveco studio 3.0 beta2 for harmonios
- 虚假的暑假
- 中国信通院《数据安全产品与服务图谱》,美创科技实现四大板块全覆盖
- 通过两级网关设计来路由服务网格流量
- Memory alignment of structure
- Bean configuration override in boot
猜你喜欢
Summary of monthly report | list of major events of moonbeam in June
JS learning notes - first acquaintance
OSPF - route aggregation [(summary) including configuration commands] | address summary calculation method - detailed explanation
Win11应用商店无法加载页面怎么办?Win11商店无法加载页面
Teach you how to build virtual machines locally and deploy microservices
Compress words (kmp/ string hash, double hash)
OSPF - detailed explanation of NSSA area and full NSSA area (including configuration command), LSA type 7 lsa-7
sim2real环境配置教程
一文读懂AGV的关键技术——激光SLAM与视觉SLAM的区别
[Yu Yue education] reference materials of sensing and intelligent control technology of Nanjing University of Technology
随机推荐
What are the necessary functions of short video app development?
Rock PI Development Notes (II): start with rock PI 4B plus (based on Ruixing micro rk3399) board and make system operation
2020.4.12 byte written test questions B DP D monotone stack
day4
台积电全球员工薪酬中位数约46万,CEO约899万;苹果上调日本的 iPhone 售价 ;Vim 9.0 发布|极客头条...
Effectively use keywords to increase Amazon sales
Huawei ECS installs mysqlb for mysqld service failed because the control process exited with error code. See “sys
分析超700万个研发需求发现,这8门编程语言才是行业最需要的!
Construction and business practice of Zhongke brain knowledge map platform
Vscade set multi line display of tab
Leetcode -- number of palindromes
【5G NR】RRC连接释放
Dimension table and fact table in data warehouse
Various entanglements between qvariant and Jason -- QT
Yyds dry inventory company stipulates that all interfaces use post requests. Why?
电脑设备打印机驱动安装失败如何解决
Summary | three coordinate systems in machine vision and their relationships
Crawl the information of national colleges and universities in 1 minute and make it into a large screen for visualization!
Maui学习之路(三)--Winui3深入探讨
OSPF - route aggregation [(summary) including configuration commands] | address summary calculation method - detailed explanation