Struct InputHint
An immutable, UI-ready snapshot of the button prompt data for a single input action under a specific control scheme. Bundles the display text, icon sprite, raw binding path, scheme type, and icon set origin into a single value.
Inherited Members
Namespace: Scylla.Input
Assembly: ScyllaInput.dll
Syntax
public readonly struct InputHint
Remarks
Instances are produced exclusively by InputHintsManager and are
cached internally per (actionID, schemeType) key. Obtain one via
IInputHintsManager.GetHint(string) or
IInputHintsManager.GetHint(string, ControlSchemeType).
Because this is a readonly struct, copies are cheap and field reads
carry no overhead. The sentinel value Invalid is returned by
all hint retrieval methods when the action is not found, the manager is not
initialized, or no binding could be resolved. Always check
IsValid before using other properties.
Constructors
InputHint(string, string, Sprite, string, ControlSchemeType, string, bool)
Initializes a new InputHint with all properties set explicitly. Prefer using IInputHintsManager.GetHint(string) rather than constructing hints manually; the constructor is public to allow custom hint providers and testing scenarios.
Declaration
public InputHint(string actionID, string displayText, Sprite icon, string bindingPath, ControlSchemeType schemeType, string iconSetID, bool isValid)
Parameters
| Type | Name | Description |
|---|---|---|
| string | actionID | The string identifier of the action this hint represents. |
| string | displayText | The human-readable binding label to display in the UI. |
| Sprite | icon | The icon sprite for the binding, or |
| string | bindingPath | The resolved Unity Input System binding path string. |
| ControlSchemeType | schemeType | The control scheme type under which this hint was resolved. |
| string | iconSetID | The ID of the icon set that provided |
| bool | isValid |
|
Properties
ActionID
Gets the string identifier of the action this hint was generated for, as
registered with IInputActionManager. null when
IsValid is false.
Declaration
public string ActionID { get; }
Property Value
| Type | Description |
|---|---|
| string |
BindingPath
Gets the Unity Input System binding path string for the resolved binding,
for example "<Gamepad>/buttonSouth" or "<Keyboard>/space".
This is the effectivePath of the first binding that matched the scheme's
device types. null when IsValid is false.
Declaration
public string BindingPath { get; }
Property Value
| Type | Description |
|---|---|
| string |
DisplayText
Gets the human-readable label for the binding, such as "Space",
"A", or "Left Click". Sourced first from the matched
DisplayText; if that is empty the Unity
Input System's own binding display string is used as a fallback. May be
null when IsValid is false.
Declaration
public string DisplayText { get; }
Property Value
| Type | Description |
|---|---|
| string |
Icon
Gets the icon sprite for the binding as resolved from the active
InputIconSet. May be null even on a valid hint when no
icon set is registered, no mapping covers the binding path, or the mapping's
sprite field was left unassigned.
Declaration
public Sprite Icon { get; }
Property Value
| Type | Description |
|---|---|
| Sprite |
IconSetID
Gets the ID of the InputIconSet that was used to look up
Icon and DisplayText. May be null when
IsValid is false or when no icon set was available.
Declaration
public string IconSetID { get; }
Property Value
| Type | Description |
|---|---|
| string |
Invalid
Gets the canonical invalid sentinel value returned by hint retrieval methods when the action is not registered, the manager is not initialized, or no binding could be resolved for the requested scheme type. Always check IsValid on any retrieved hint before using its properties.
Declaration
public static InputHint Invalid { get; }
Property Value
| Type | Description |
|---|---|
| InputHint |
IsValid
Gets a value indicating whether this hint contains usable data. A valid hint has a non-null ActionID and a resolved BindingPath. Invalid hints are represented by the Invalid sentinel. Always check this property before reading other fields.
Declaration
public bool IsValid { get; }
Property Value
| Type | Description |
|---|---|
| bool |
SchemeType
Gets the ControlSchemeType that was in effect when this hint was
built, identifying which device family's bindings and icon sets were consulted.
Will be Unknown when IsValid is
false.
Declaration
public ControlSchemeType SchemeType { get; }
Property Value
| Type | Description |
|---|---|
| ControlSchemeType |
Methods
ToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |