- Mastering UI Development with Unity
- Ashley Godbold
- 218字
- 2021-08-27 18:43:17
Cell Size
Unlike the Horizontal and Vertical Layout Groups, which determine the size of the children either by their Rect Transform component or by scaling them to fit inside the parent's Rect Transform, the Grid Layout Group requires you to specify the width and height of the child objects. You accomplish this by setting the X and Y properties of the Cell Size property. This will automatically apply the specified X and Y sizes to each of the children's Width and Height property of their Rect Transform, respectively.
Due to the Cell Size property and the lack of a Control Child size property, the children are not guaranteed to fit within the parent's Rect Transform. If too many children exist, it is possible they will be drawn outside the parent's Rect Transform. So, if you have a grid filling up dynamically that can change throughout the gameplay and want the grid to always fit within a specific area, you will have to prepare for that scenario of overflow.
The Grid Layout Group allows you to specify both an X and Y Spacing. The X Spacing is the horizontal spacing, and the Y Spacing is the vertical spacing. These values will not be overridden by further property choices, as they can be with the Horizontal and Vertical Layout Groups.
- Spring Boot 2實戰之旅
- 微服務設計(第2版)
- GeoServer Cookbook
- Python Tools for Visual Studio
- Bootstrap Essentials
- 小程序,巧運營:微信小程序運營招式大全
- 零基礎學Python數據分析(升級版)
- Mastering Unity 2D Game Development(Second Edition)
- MySQL 8從零開始學(視頻教學版)
- 軟件測試分析與實踐
- Practical Maya Programming with Python
- Python預測之美:數據分析與算法實戰(雙色)
- 數字媒體技術概論
- AI輔助編程Python實戰:基于GitHub Copilot和ChatGPT
- 高性能MVVM框架的設計與實現:San