Class HoldInteraction
Performs the action if the control is pressed and held for at least the set duration (which defaults to defaultHoldTime).
Inheritance
System.Object
HoldInteraction
Namespace: UnityEngine.InputSystem.Interactions
Syntax
public class HoldInteraction : IInputInteraction
Fields
duration
Duration in seconds that the control must be pressed for the hold to register.
Declaration
public float duration
Field Value
Type | Description |
---|---|
System.Single |
Remarks
If this is less than or equal to 0 (the default), defaultHoldTime is used.
pressPoint
Magnitude threshold that must be crossed by an actuated control for the control to be considered pressed.
Declaration
public float pressPoint
Field Value
Type | Description |
---|---|
System.Single |
Remarks
If this is less than or equal to 0 (the default), defaultButtonPressPoint is used.
See Also
startContinuously
If enabled, then while the hold is in Started phase, started will be triggered every time a bound control changes value.
Declaration
public bool startContinuously
Field Value
Type | Description |
---|---|
System.Boolean |
Methods
Process(ref InputInteractionContext)
Declaration
public void Process(ref InputInteractionContext context)
Parameters
Type | Name | Description |
---|---|---|
InputInteractionContext | context |
Implements
Reset()
Declaration
public void Reset()