An open API service indexing awesome lists of open source software.

https://github.com/thundertecke/press-and-repeat-interaction

Hold and repeat interaction for Unity Input System
https://github.com/thundertecke/press-and-repeat-interaction

events gamedev gamedevelopment input-system inputsystem interaction unity unity-interaction unity2d unity3d

Last synced: 10 months ago
JSON representation

Hold and repeat interaction for Unity Input System

Awesome Lists containing this project

README

          

# Press and repeat interaction

This interaction allows you to generate Input System events to manage a held key.
"Press" event can be activate to also generate an event on pressing the binding.

This interaction was developed with **Unity 2021.3.10f1** and **Input System 1.4.4**

## How to install

You can copy ``PressAndRepeatInteraction.cs`` script everywhere in your project folder. But preferably correctly oragnized.
For exemple, in ``Interactions`` folder.

## How to use

You just have to add the interaction on your action (or binding) with the ``+`` and select ``Press And Repeat``.
Then you have to adjust parameters on your convenience.

### Parameters

- ``Press`` : Used to activate ``press`` event. It's send on pressing. Just like normal action.
- ``Hold Time`` : Used to consider binding held, and send a second event.
- ``Repeating Time`` : Used to send next events with a constant time interval.