Enum UIAlignment
Defines the nine canonical alignment positions within a rectangular parent area, arranged in a 3x3 grid of upper, middle, and lower rows crossed with left, center, and right columns.
Namespace: Scylla.Core.Util.UI
Assembly: ScyllaCore.dll
Syntax
public enum UIAlignment : byte
Remarks
The values map directly to the corresponding UIAnchor presets
available via FromAlignment(UIAlignment). Use UIAlignment
as a high-level descriptor and convert it to a UIAnchor when
you need to configure a RectTransform.
The underlying storage type is byte, allowing the enum to be stored
compactly in data structures or serialized without padding overhead.
Values are numbered 0-8 in reading order (left-to-right, top-to-bottom): upper row (0-2), middle row (3-5), lower row (6-8).
Fields
| Name | Description |
|---|---|
| LowerCenter | Aligns the element to the horizontal center of the parent rectangle's bottom edge. Corresponds to LowerCenter. |
| LowerLeft | Aligns the element to the lower-left corner of the parent rectangle. Corresponds to LowerLeft. |
| LowerRight | Aligns the element to the lower-right corner of the parent rectangle. Corresponds to LowerRight. |
| MiddleCenter | Aligns the element to the exact center of the parent rectangle, both horizontally and vertically. Corresponds to MiddleCenter. |
| MiddleLeft | Aligns the element to the vertical center of the parent rectangle's left edge. Corresponds to MiddleLeft. |
| MiddleRight | Aligns the element to the vertical center of the parent rectangle's right edge. Corresponds to MiddleRight. |
| UpperCenter | Aligns the element to the horizontal center of the parent rectangle's top edge. Corresponds to UpperCenter. |
| UpperLeft | Aligns the element to the upper-left corner of the parent rectangle. Corresponds to UpperLeft. |
| UpperRight | Aligns the element to the upper-right corner of the parent rectangle. Corresponds to UpperRight. |