Notifications
bg
Azhao
Jinan, China
0
Likes
0
Followers
0
Connections
All
Articles0
Games0
Showcases0
Column0
Jobs0
Azhao
Aug 20, 2019
各位大佬 VerticalLayoutGroup的Control Child Size属性到底是用来干什么的啊。我父级(取名叫A)设置一个VerticalLayouGroup其中Control Child Size属性Width和Height全部勾上,然后添加一个子级(取名叫B)。子级身上也添加一个VerticalLayoutGroup其中Control Child Size也全部勾上。此时在给B在添加一个子级添加一个GameObject (取名叫C),给C添加一个Text组件 此时C的RectTransform的Width和Height可以随着Text组件的内容自适应大小。这是为什么 求大佬解疑

J
23 days ago
文档的解释是“Whether the Layout Group controls the width and height of its child layout elements.”但是我看官方文档对这个组件似乎也好久没更新过了。应该是当你选中Child Controls Size后,就由子节点自己通过layout properties控制。也可以通过layout element组件配合使用。至于添加了text组件的节点可以自适应,原因应该是Text也继承了ILayoutElement。你可以从右下角查看layout properties,没当你修改text的内容,layout properties对应的preferred width也会自动修改。!20190827201643.png
About Me
No description
See more
Skills
No skills added yet
Certifications (0)
Import
See all
Azhao's liked projects (0)
No likes yet
Following (0)
Not following anyone yet
Followers (0)
No followers
Following Companies (0)
Not following anyone yet