SUILayout
| Propriété | Enabled | Is this UI layout component Enabled? |
| Propriété | PaddingLeft | Space reserved for the left edge of the padding during the layout phase. |
| Propriété | PaddingRight | Space reserved for the right edge of the padding during the layout phase. |
| Propriété | PaddingTop | Space reserved for the top edge of the padding during the layout phase. |
| Propriété | PaddingBottom | Space reserved for the bottom edge of the padding during the layout phase. |
| Propriété | ChildAlignment | – |
| Propriété | Spacing | The spacing to use between layout elements in the layout group. |
| Propriété | ChildControlHeight | Returns true if the Layout Group controls the heights of its children. |
| Propriété | ChildControlWidth | Returns true if the Layout Group controls the widths of its children. |
| Propriété | ChildForceExpandHeight | Whether to force the children to expand to fill additional available vertical space. |
| Propriété | ChildForceExpandWidth | Whether to force the children to expand to fill additional available horizontal space. |
| Propriété | GridCellSize | The size to use for each cell in the grid. |
| Propriété | GridSpacing | The spacing to use between layout elements in the grid. |
| Propriété | GridConstraintCount | How many cells there should be along the constrained axis. |
| Propriété | GridConstraint | – |
| Propriété | GameObject | – |
Propriétés
Enabled
Is this UI layout component Enabled?
Exemple
Space.Host.ExecutingObject.UILayout.Enabled = false
--clicking this object will toggle a Layout's Enabled status
thisGameObject = Space.Host.ExecutingObject
layout = Space.Host.GetReference("layout").UILayout
--make sure to add this reference to the Scripting Runtime component
OnClick = function()
layout.Enabled= not layout.Enabled
end
thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
PaddingLeft
Space reserved for the left edge of the padding during the layout phase.
Exemple
Space.Host.ExecutingObject.UILayout.PaddingLeft= 2
PaddingRight
Space reserved for the right edge of the padding during the layout phase.
Exemple
Space.Host.ExecutingObject.UILayout.PaddingRight= 2
PaddingTop
Space reserved for the top edge of the padding during the layout phase.
Exemple
Space.Host.ExecutingObject.UILayout.PaddingTop= 2
PaddingBottom
Space reserved for the bottom edge of the padding during the layout phase.
Exemple
Space.Host.ExecutingObject.UILayout.PaddingBottom= 2
ChildAlignment
Exemple
Space.Host.ExecutingObject.UILayout.ChildAlignment = "1"
Spacing
The spacing to use between layout elements in the layout group.
Exemple
Space.Host.ExecutingObject.UILayout.Spacing= 2
ChildControlHeight
Returns true if the Layout Group controls the heights of its children. Returns false if children control their own heights.
If set to false, the layout group will only affect the positions of the children while leaving the heights untouched. The heights of the children can be set via the respective RectTransforms in this case.
If set to true, the heights of the children are automatically driven by the layout group according to their respective minimum, preferred, and flexible heights. This is useful if the heights of the children should change depending on how much space is available. In this case the height of each child cannot be set manually in the RectTransform, but the minimum, preferred and flexible height for each child can be controlled by adding a LayoutElement component to it.
Exemple
Space.Host.ExecutingObject.UILayout.ChildControlHeight= true
ChildControlWidth
Returns true if the Layout Group controls the widths of its children. Returns false if children control their own widths.
If set to false, the layout group will only affect the positions of the children while leaving the widths untouched. The widths of the children can be set via the respective RectTransforms in this case.
If set to true, the widths of the children are automatically driven by the layout group according to their respective minimum, preferred, and flexible widths. This is useful if the widths of the children should change depending on how much space is available. In this case the width of each child cannot be set manually in the RectTransform, but the minimum, preferred and flexible width for each child can be controlled by adding a LayoutElement component to it.
Exemple
Space.Host.ExecutingObject.UILayout.ChildControlWidth= false
ChildForceExpandHeight
Whether to force the children to expand to fill additional available vertical space.
Exemple
Space.Host.ExecutingObject.UILayout.ChildForceExpandHeight= false
ChildForceExpandWidth
Whether to force the children to expand to fill additional available horizontal space.
Exemple
Space.Host.ExecutingObject.UILayout.ChildForceExpandWidth= false
GridCellSize
The size to use for each cell in the grid.
Exemple
Space.Host.ExecutingObject.UILayout.GridCellSize= Vector.New(1,1,0)
GridSpacing
The spacing to use between layout elements in the grid.
Exemple
Space.Host.ExecutingObject.UILayout.GridSpacing= Vector.New(1,1,0)
GridConstraintCount
How many cells there should be along the constrained axis.
Exemple
Space.Host.ExecutingObject.UILayout.GridConstraintCount= 2
GridConstraint
Exemple
Space.Host.ExecutingObject.UILayout.GridConstraint = 1
GameObjectLecture seule
Exemple
theGameObject = Space.Host.ExecutingObject.UILayout.GridConstraint



