Class ControlSchemeDrawer
Provides static editor utility methods for rendering ControlScheme data inside Unity custom inspectors and editor windows.
Inherited Members
Namespace: Scylla.Input.Editor
Assembly: ScyllaInput.Editor.dll
Syntax
public static class ControlSchemeDrawer
Remarks
All draw methods assume an active EditorGUILayout context and must be called
from within an OnInspectorGUI or equivalent editor callback.
The class uses a color-coded badge system to distinguish scheme types:
- Keyboard/Mouse - blue (Scylla.Core.Editor.ScyllaEditorColors.Info).
- Gamepad - green (Scylla.Core.Editor.ScyllaEditorColors.Success).
- Touch - yellow (Scylla.Core.Editor.ScyllaEditorColors.Warning).
- Custom - purple.
- Unknown - muted grey (Scylla.Core.Editor.ScyllaEditorColors.TextMuted).
Methods
CreateCompactWidget(ControlScheme)
Creates a UnityEngine.UIElements.VisualElement row showing the color-coded scheme-type badge,
display name, and optional icon set label.
Returns a placeholder element when scheme is null.
Declaration
public static VisualElement CreateCompactWidget(ControlScheme scheme)
Parameters
| Type | Name | Description |
|---|---|---|
| ControlScheme | scheme | The control scheme to display. |
Returns
| Type | Description |
|---|---|
| VisualElement |
DrawCompact(ControlScheme)
Draws a single-line summary row for the given ControlScheme, showing the color-coded scheme-type badge, display name, and - when present - the associated icon set ID in muted text.
Declaration
public static void DrawCompact(ControlScheme scheme)
Parameters
| Type | Name | Description |
|---|---|---|
| ControlScheme | scheme | The control scheme to display. When null, a "No control scheme" placeholder label is rendered instead. |
DrawDetailed(ControlScheme)
Draws an expanded, multi-line detail view for the given ControlScheme, including its display name as a header, scheme ID, color-coded scheme type, optional gamepad type (for Gamepad schemes), icon set, and the comma-separated list of associated input devices.
Declaration
public static void DrawDetailed(ControlScheme scheme)
Parameters
| Type | Name | Description |
|---|---|---|
| ControlScheme | scheme | The control scheme to display. When null, a "No control scheme selected." placeholder label is rendered instead. |
DrawSchemeTypeBadge(ControlSchemeType)
Draws a single color-coded badge label for the specified ControlSchemeType,
using a fixed width of 100 pixels and the bold label style.
Declaration
public static void DrawSchemeTypeBadge(ControlSchemeType schemeType)
Parameters
| Type | Name | Description |
|---|---|---|
| ControlSchemeType | schemeType | The control scheme type whose human-readable label and tint color will be rendered. |
GetSchemeTypeColor(ControlSchemeType)
Returns the editor tint color associated with the specified ControlSchemeType, used to colorize badge labels in both compact and detailed views.
Declaration
public static Color GetSchemeTypeColor(ControlSchemeType schemeType)
Parameters
| Type | Name | Description |
|---|---|---|
| ControlSchemeType | schemeType | The control scheme type to look up. |
Returns
| Type | Description |
|---|---|
| Color | A UnityEngine.Color value: blue for KeyboardMouse, green for Gamepad, yellow for Touch, purple for Custom, and muted grey for any unrecognized value. |
GetSchemeTypeLabel(ControlSchemeType)
Returns a short, human-readable display label for the specified ControlSchemeType, suitable for use in badge text or list columns.
Declaration
public static string GetSchemeTypeLabel(ControlSchemeType schemeType)
Parameters
| Type | Name | Description |
|---|---|---|
| ControlSchemeType | schemeType | The control scheme type to look up. |
Returns
| Type | Description |
|---|---|
| string | One of the strings |