Layout
Radial Layout Group
Arrange UI children around an arc or circle
Overview
Radial Layout Group positions children around a circle or arc. Use it for radial menus, dials, and circular groups of controls.
Usage
Add Radial Layout Group to the parent of your UI items.
Size the parent rectangle and its padding, then set the start and end angles.
Choose clockwise ordering and even distribution.
Enable Face Center if each item should rotate toward the middle.
Customization
- Disable Even Distribution to use custom angular spacing.
- Control Child Size and Child Size let the layout size every item consistently
Public API
Use RadialLayoutGroup in the Evo.UI namespace.
Properties
| Name | Type | Description |
|---|---|---|
Radius | float | Read-only radius derived from the padded parent rectangle. |
StartAngle | float | First angle of the arc. |
EndAngle | float | Last angle of the arc. |
Clockwise | bool | Direction of item ordering. |
EvenDistribution | bool | Distributes items evenly. |
CustomSpacing | float | Angular spacing when distribution is manual. |
FaceCenter | bool | Rotates items toward the center. |
ControlChildSize | bool | Applies a common child size. |
ChildSize | Vector2 | Dimensions used when child sizing is enabled. |
Example
using UnityEngine;
using Evo.UI;
public class RadialLayoutGroupExample : MonoBehaviour
{
[SerializeField] private RadialLayoutGroup target;
private void Start()
{
target.padding = new RectOffset(20, 20, 20, 20);
target.StartAngle = 0f;
target.EndAngle = 360f;
target.EvenDistribution = true;
}
}