Version: 2017.4
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Align

enumeration

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

This enumeration contains values to control how an element is aligned in its parent during the layout phase.

The cross axis of a container is perpendicular to the primary axis on which children are laid out, that is, its flex direction.

Properties

AutoDefault value (currently FlexStart).
FlexStartItems are aligned at the beginning on the cross axis.
CenterItems are centered on the cross axis.
FlexEndItems are aligned at the end on the cross axis.
StretchStretches items on the cross axis.