Page cover image

Input Action Event

Listening for input actions

Like what your seeing?

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