Class ScyllaUISpacer
An empty layout element that either consumes free main-axis space (flexible mode) or reserves a fixed main-axis length (fixed mode). Used to push siblings apart in a stack without inserting an empty RectTransform with custom margin math.
Inherited Members
Namespace: Scylla.Core.Util.UI
Assembly: ScyllaCore.dll
Syntax
[AddComponentMenu("Scylla/UI/Layout/Spacer")]
[DisallowMultipleComponent]
[RequireComponent(typeof(RectTransform))]
[ExecuteAlways]
public sealed class ScyllaUISpacer : MonoBehaviour
Remarks
When UseFixedLength is false (the default), the spacer
consumes positive free main-axis space proportional to other flexible siblings.
The MinLength guarantees the spacer never collapses below a
minimum.
When UseFixedLength is true, the spacer reserves exactly
FixedLength main-axis pixels and does not participate in flex
distribution. This is the equivalent of inserting a fixed-size empty box
between siblings.
Properties
FixedLength
Main-axis length used in fixed mode. Resolved against the parent stack's main
axis when in percent units. Ignored when UseFixedLength is
false.
Declaration
public ScyllaUILength FixedLength { get; set; }
Property Value
| Type | Description |
|---|---|
| ScyllaUILength |
MinLength
Minimum main-axis length in flexible mode. Resolved against the stack main axis
when in percent units. Ignored when UseFixedLength is true.
Declaration
public ScyllaUILength MinLength { get; set; }
Property Value
| Type | Description |
|---|---|
| ScyllaUILength |
UseFixedLength
When true, this spacer behaves as a fixed-size empty box of length
FixedLength on the main axis. When false, the spacer
consumes free space along the main axis.
Declaration
public bool UseFixedLength { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |