RadialLayout COMPONENT

The RadialLayout component is the main component of the layout.

IMPORTANT: the radial layout object must be contained inside a Canvas object!


Layout Settings


Auto Rebuild Layout

Always: when changes are detected, the layout is rebuilt in both editor play mode.

Editor Only: rebuilds the layout only in the editor. (Recommended)

Never: never rebuilds the layout automatically. Rebuild must be called using the Force Rebuild button.


Circle Radius

Changes the radius around the center on which the nodes are placed. Visible if Editor Gizmos are enabled.

Radius can also be changed using the green circle handle if Editor Gizmos are enabled.


Circle Slice

Modify this value if you want to distribuite nodes just over a selected angle, instead of the entire circle. Visible as a yellow arc if Editor Gizmos are enabled.


Enable Multiple Depth Radius

With this setting you can define a different radius for each node depth. The value is a multiplier of the base Circle Radius. (1.5 means 50% bigger than base radius)


Rotation Offset

Use this setting to rotate the layout.

Rotation can also be changed using the green circle handle if Editor Gizmos are enabled.


Scale Nodes

Enable this flag if you want to change the size of your Nodes.

Scaling Factor

This value is relative to the main circle radius. (A value of 100 over a radius of 100 equals to node scale of 1)

Min Node Scale

The minumum value Nodes will be scaled to, turns red if scale is clamped.

Max Node Scale

The maximum value Nodes will be scaled to, turns red if scale is clamped.


Nodes Distribution

Concentric: nodes and their children will be placed and rearranged on concentric circles. Ideal for radial menus and radial UIs.

Branches: nodes will still be placed on concentric circles, but children positioning will be placed around the parent main bisector. Ideal for graphs.


Show Inner Node

Turn on this flag if you want to show the Inner Node in the center of your layout. You can customize it by modifying the Inner Node gameobject found in the layout hierarchy.

The Inner Node is just aesthetical, it doens't have a RadialLayoytNode component and it's not added to the Nodes collection of the layout.

Inner Node Scale

Modify this parameter to change the size of the Inner Node.


Use Query System

Turn this flag on if you want to enable the Query System on this layout. The Query System allows you to search for Nodes, Links and Sub-Layouts using unique Ids and tags.

When you enable this option, a RadialLayoutQueryTarget will be added to every node in the layout, and an UniqueId will be assigned to them.

For more information see Query System


Elements Prefabs

In this section you can assign the prefabs that will be instantiated when adding nodes or rebuilding links.


Node Prefab

By default, empty node will be added to the layout (shown as a blue circle if Editor Gizmos are enabled) when you add new nodes. These empty nodes will act just as anchor points where you can place your elements inside it to customize yhe layout.

If you want to instantiate a custom Node prefab instead, simply assign this value and it will be instantiated when adding new nodes.

Keep Prefab Linking

Turn this flag on if you want to mantain reference to original prefab when adding new nodes. If this option is turned off, new nodes will be instantiated as simple gameobjects, losing reference to the prefab.


Link Prefab

Assign this field with your custom link prefab, that will be used when regenerating links between nodes.

You can leave this field empty if you want to create a linkless layout.


Actions


Add Node

Adds a node in the first circle of this layout (depth 0).


Delete Last Node

Deletes the last node in the first circle (depth 0) until it is clear.


Clear All Offsets

Clears any offset assigned to layout and nodes (eg. rotation, radius, distance offsets...) and restores the layout to its original state.


Select Child Node

Selects the first node of depth 0 found.


Force Rebuild

Forces the entire layout to be rebuilt.


Editor Settings

These are settings that affects only editor features, they won't impact the final appearance of the layout in your game.


Force Node Selection

When this option is on, nodes and layoyt will be forcefully selected in the editor when clicking on their inner elements (eg. the node background).

This is useful when you just want to edit nodes quickly and filter out their graphical elements when selecting objects in the editor scene view.


Draw Gizmos

Turn this setting on to show helper gizmos in the scene view

Circle Radius

Shows / Hides the circular gizmos on which nodes will be placed.

Nodes

Shows / Hides a blue circle over nodes. Useful when adding empty nodes, instead of prefabbed nodes that already have graphical elements in them.

Resizing Handles

Shows / Hides the green resizing handle used to rotate and change radius of the layout.


Handle Locks

Use this setting if you want to change only radius or rotation when using the resizing handle.


Snap Settings

Various settings for the snapping of the resizing handle.

NOTE: to enable snap hold CTRL while moving the resizing handle. Behaviour may change based on your unity grid and scene preferences.