Scylla Framework
  • API Reference
Search Results for

    Show / Hide Table of Contents
    • Scylla.Input
      • AutoResolveChange
      • AutoResolveResult
      • BindingConflict
      • BindingStorageSettings
      • BindingStorageType
      • BridgeSettings
      • BufferedInput
      • ConfigActionEntry
      • ConfigBindingEntry
      • ConfigConflict
      • ConfigSchemeGroup
      • ContextValidationMessage
      • ContextValidationSeverity
      • ControlScheme
      • ControlSchemeChangedEvent
      • ControlSchemeManager
      • ControlSchemeType
      • GamepadButton
      • GamepadType
      • IBindingStorage
      • IControlSchemeManager
      • IInputActionManager
      • IInputBindingManager
      • IInputBridgeManager
      • IInputBufferManager
      • IInputContextManager
      • IInputHintsManager
      • IInputListener
      • IScyllaInputBridge
      • InputActionCanceledEvent
      • InputActionManager
      • InputActionPerformedEvent
      • InputActionStartedEvent
      • InputBindingManager
      • InputBindingsLoadedEvent
      • InputBindingsSavedEvent
      • InputBridgeManager
      • InputBridgeQueryMode
      • InputBufferConsumedEvent
      • InputBufferManager
      • InputBufferedEvent
      • InputConflictResolution
      • InputContext
      • InputContextChangedEvent
      • InputContextDefinition
      • InputContextManager
      • InputContextPoppedEvent
      • InputContextPushedEvent
      • InputDeviceChangedEvent
      • InputDeviceConnectedEvent
      • InputDeviceDisconnectedEvent
      • InputDeviceType
      • InputDeviceUtil
      • InputDisabledEvent
      • InputEnabledEvent
      • InputEventType
      • InputHint
      • InputHintChangedEvent
      • InputHintsManager
      • InputIconSet
      • InputIconSet.IconMapping
      • InputIconSetChangedEvent
      • InputLoggingSettings
      • InputRebindCancelledEvent
      • InputRebindCompletedEvent
      • InputRebindManager
      • InputRebindOperation
      • InputRebindStartedEvent
      • InputRebindUtils
      • JSONFileBindingStorage
      • ManagedRebindCancelledEvent
      • ManagedRebindCompletedEvent
      • ManagedRebindDataRefreshedEvent
      • ManagedRebindStartedEvent
      • PlayerPrefsBindingStorage
      • RebindMode
      • RebindSettings
      • ScyllaInput
      • ScyllaInput.Meta
      • ScyllaInputAction
      • ScyllaInputActionMap
      • ScyllaInputBinding
      • ScyllaInputConfiguration
      • ScyllaInputContextConfiguration
      • ScyllaKey
      • ScyllaKeyConverter
      • ScyllaModifier
      • UnityInputSystemBridge
    • Scylla.Input.Editor
      • ControlSchemeDrawer
      • DeviceStatusWidget
      • IconMappingDrawer
      • InputIconSetEditor
      • ScyllaInputConfigurationEditor
      • ScyllaInputContextConfigurationEditor
      • ScyllaInputDependencyProvider
      • ScyllaInputEditor
      • ScyllaInputMenuItems
      • ScyllaInputWizard

    Class DeviceStatusWidget

    Provides static editor utility methods for rendering InputDevice information with color-coded type badges, used consistently across Scylla Input editor tools.

    Inheritance
    object
    DeviceStatusWidget
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Scylla.Input.Editor
    Assembly: ScyllaInput.Editor.dll
    Syntax
    public static class DeviceStatusWidget
    Remarks

    Supported device types and their visual properties:

    • Keyboard ([KB]) - blue (Scylla.Core.Editor.ScyllaEditorColors.Info).
    • Mouse ([M]) - blue (Scylla.Core.Editor.ScyllaEditorColors.Info).
    • Gamepad ([GP]) - green (Scylla.Core.Editor.ScyllaEditorColors.Success).
    • Touchscreen ([TS]) - yellow (Scylla.Core.Editor.ScyllaEditorColors.Warning).
    • Joystick ([JS]) - purple.
    • Pen ([PN]) - cyan.
    • Unknown ([?]) - muted grey.

    Icon UnityEngine.GUIContent objects are lazy-initialized and cached in static fields to avoid allocating new instances on every repaint.

    The DrawDeviceSummary(IReadOnlyList<InputDevice>, IInputBridgeManager) method uses a shared StringBuilder to build the summary string; it is not thread-safe.

    Methods

    CreateCompactWidget(InputDevice, InputDeviceType)

    Creates a compact UnityEngine.UIElements.VisualElement showing the color-coded badge and device name without a connection-status column. Returns a muted "None" label when device is null.

    Declaration
    public static VisualElement CreateCompactWidget(InputDevice device, InputDeviceType deviceType)
    Parameters
    Type Name Description
    InputDevice device

    The input device to display.

    InputDeviceType deviceType

    The pre-resolved device type used for badge color selection.

    Returns
    Type Description
    VisualElement

    CreateDeviceListWidget(IReadOnlyList<InputDevice>, IInputBridgeManager)

    Creates a UnityEngine.UIElements.VisualElement containing one CreateDeviceRow(InputDevice, InputDeviceType) per device in devices, or a muted "No devices connected." label when the list is null or empty.

    Declaration
    public static VisualElement CreateDeviceListWidget(IReadOnlyList<InputDevice> devices, IInputBridgeManager bridgeManager)
    Parameters
    Type Name Description
    IReadOnlyList<InputDevice> devices

    The list of devices to display.

    IInputBridgeManager bridgeManager

    Used to resolve each device's type. May be null.

    Returns
    Type Description
    VisualElement

    CreateDeviceRow(InputDevice, InputDeviceType)

    Creates a UnityEngine.UIElements.VisualElement row containing a color-coded badge label, the device display name, and a "Connected" or "Disconnected" status label. Returns a placeholder row when device is null.

    Declaration
    public static VisualElement CreateDeviceRow(InputDevice device, InputDeviceType deviceType)
    Parameters
    Type Name Description
    InputDevice device

    The input device to display.

    InputDeviceType deviceType

    The pre-resolved device type used for badge color selection.

    Returns
    Type Description
    VisualElement

    Draw(InputDevice, InputDeviceType)

    Draws a full-width horizontal row containing a color-coded device-type badge, the device's display name in bold, and a connection-status label ("Connected" in green or "Disconnected" in grey). The row uses the fixed height defined by Scylla.Input.Editor.DeviceStatusWidget.ROW_HEIGHT.

    Declaration
    public static void Draw(InputDevice device, InputDeviceType deviceType)
    Parameters
    Type Name Description
    InputDevice device

    The UnityEngine.InputSystem.InputDevice to render. When null, a "No device" placeholder is drawn instead.

    InputDeviceType deviceType

    The pre-resolved InputDeviceType for device, used to select the badge icon and tint color. Pass Unknown when the type cannot be determined.

    DrawCompact(InputDevice, InputDeviceType)

    Draws a compact single-line indicator consisting of just the color-coded device-type badge and the device's display name, without a connection-status label. Useful for embedding in two-column inspector rows alongside a field label.

    Declaration
    public static void DrawCompact(InputDevice device, InputDeviceType deviceType)
    Parameters
    Type Name Description
    InputDevice device

    The UnityEngine.InputSystem.InputDevice to render. When null, renders a muted "None" label.

    InputDeviceType deviceType

    The pre-resolved InputDeviceType for device, used to select the badge icon and tint color.

    DrawDeviceList(IReadOnlyList<InputDevice>, IInputBridgeManager)

    Draws one Draw(InputDevice, InputDeviceType) row per device in devices, skipping any null entries. Renders a "No devices connected." muted label when the list is null or empty.

    Declaration
    public static void DrawDeviceList(IReadOnlyList<InputDevice> devices, IInputBridgeManager bridgeManager)
    Parameters
    Type Name Description
    IReadOnlyList<InputDevice> devices

    The read-only list of UnityEngine.InputSystem.InputDevice objects to render, as returned by IInputBridgeManager.GetAllDevices().

    IInputBridgeManager bridgeManager

    The IInputBridgeManager used to resolve each device's InputDeviceType. When null, all devices default to Unknown.

    DrawDeviceSummary(IReadOnlyList<InputDevice>, IInputBridgeManager)

    Draws a compact single-line text summary counting devices by type, formatted as a comma-separated list (e.g., "1 KB, 1 M, 2 GP"). Renders a muted "No devices" label when the list is null or empty.

    Declaration
    public static void DrawDeviceSummary(IReadOnlyList<InputDevice> devices, IInputBridgeManager bridgeManager)
    Parameters
    Type Name Description
    IReadOnlyList<InputDevice> devices

    The read-only list of UnityEngine.InputSystem.InputDevice objects to summarize.

    IInputBridgeManager bridgeManager

    The IInputBridgeManager used to resolve each device's InputDeviceType. When null, all devices are counted as "Other".

    Remarks

    Uses a shared StringBuilder instance; this method is not thread-safe. Device types that do not fall into Keyboard, Mouse, or Gamepad categories are counted together in the "Other" bucket.

    GetDeviceTypeColor(InputDeviceType)

    Returns the editor tint color associated with the specified InputDeviceType, applied to the device-type badge text in all draw methods.

    Declaration
    public static Color GetDeviceTypeColor(InputDeviceType deviceType)
    Parameters
    Type Name Description
    InputDeviceType deviceType

    The device type to look up.

    Returns
    Type Description
    Color

    A UnityEngine.Color value: blue for Keyboard/Mouse, green for Gamepad, yellow for Touchscreen, purple for Joystick, cyan for Pen, and muted grey for Unknown or any unrecognized value.

    GetDeviceTypeIcon(InputDeviceType)

    Returns the lazily cached UnityEngine.GUIContent badge for the specified InputDeviceType, containing a short abbreviation as the text and a human-readable name as the tooltip.

    Declaration
    public static GUIContent GetDeviceTypeIcon(InputDeviceType deviceType)
    Parameters
    Type Name Description
    InputDeviceType deviceType

    The device type to look up.

    Returns
    Type Description
    GUIContent

    A UnityEngine.GUIContent instance: [KB], [M], [GP], [TS], [JS], [PN], or [?] for unrecognized types.

    GetDeviceTypeLabel(InputDeviceType)

    Returns a human-readable display name for the specified InputDeviceType, suitable for use in log messages, tooltips, or label fields.

    Declaration
    public static string GetDeviceTypeLabel(InputDeviceType deviceType)
    Parameters
    Type Name Description
    InputDeviceType deviceType

    The device type to look up.

    Returns
    Type Description
    string

    One of the strings "Keyboard", "Mouse", "Gamepad", "Touchscreen", "Joystick", "Pen/Stylus", or "Unknown" for unrecognized values.

    In this article
    Back to top Scylla Framework - Input Module API Documentation