Page cover image

Input Action Event

Listening for input actions

Like what your seeing?

Support us as a GitHub Sponsor and get instant access to all our assets, exclusive tools and assets, escalated support and issue tracking and our gratitude. These articles are made possible by our GitHub Sponsors ... become a sponsor today!

Introduction

Lets you connect an InputAction to a method that takes an InputActionUpdate value as a parameter in the Unity Editor Inspector similar to the behaviour with a UI Button Click event.

Events

Changed

public InputactionEvent.ActionDataEvent changed;

This event expects a handler that takes an InputActionUpdate parameter such as.

public void HandleActionEvent(InputActionUpdate data)
{
    //Do Work
    if(data.State)
        ;//This action happened
}

Fields and Attributes

Action

public InputAction action;

A reference to the action to listen on. This action will invoke the Changed event when its data has changed as a result of update from the Steam Input system.

Last updated