ReferenceRect
Outline guide for UI bounds and placement.
Draws an unfilled outline: red, width 1 by default. EditorOnly = true draws only in the editor; false allows runtime drawing. This is a draw condition rather than removing an Entity from the build: Visible, children, script and input filter remain.
BorderWidth clamps to zero and does not add padding or minimum size. ReferenceRect is not a layout container, padded frame or clipping mechanism. Set MouseFilter.Ignore separately for a diagnostic overlay that should not receive input.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
ReferenceRectConstructor
public ReferenceRect();Creates a red width-1 guide with EditorOnly = true. Does not remove the Control from the game.
Properties3
BorderColorProperty
public Color BorderColor { get; set; }Outline color/alpha, default opaque red. Does not set a fill.
BorderWidthProperty
public float BorderWidth { get; set; }Outline width in local pixels, default 1. Negative values clamp to 0; padding/minimum size do not increase. Use a finite value.
EditorOnlyProperty
public bool EditorOnly { get; set; }Draw only under editor hint, default true. false allows the runtime outline. Does not change Visible, script processing or inclusion in a build.
Methods6
GetBorderColorColor
public Color GetBorderColor();Outline color/alpha, default opaque red. Does not set a fill.
ColorOutline color/alpha.
GetBorderWidthfloat
public float GetBorderWidth();Outline width in local pixels, default 1. Negative values clamp to 0; padding/minimum size do not increase. Use a finite value.
floatStored nonnegative outline width.
GetEditorOnlybool
public bool GetEditorOnly();Draw only under editor hint, default true. false allows the runtime outline. Does not change Visible, script processing or inclusion in a build.
boolEditor-only drawing flag.
SetBorderColorvoid
public void SetBorderColor(Color color);Outline color/alpha, default opaque red. Does not set a fill.
| Name | Type | Default |
|---|---|---|
color | Color | — |
colorOutline color/alpha, default opaque red. Does not set a fill.
SetBorderWidthvoid
public void SetBorderWidth(float width);Outline width in local pixels, default 1. Negative values clamp to 0; padding/minimum size do not increase. Use a finite value.
| Name | Type | Default |
|---|---|---|
width | float | — |
widthOutline width in local pixels, default 1. Negative values clamp to 0; padding/minimum size do not increase. Use a finite value.
SetEditorOnlyvoid
public void SetEditorOnly(bool enabled);Draw only under editor hint, default true. false allows the runtime outline. Does not change Visible, script processing or inclusion in a build.
| Name | Type | Default |
|---|---|---|
enabled | bool | — |
enabledDraw only under editor hint, default true. false allows the runtime outline. Does not change Visible, script processing or inclusion in a build.