Page cover image

Steam Input Manager

Boiler plate start up for Steam Input

Like what your seeing?

Introduction

The Steam Input Manager handles the boiler plate aspects of starting and running Steam Input updates. When used you can treat Steam InputAction objects as found in your Steam Settings much like you would an InputAction from Unity's stock system, Rewired or similar systems. For more information about the use of Steam Input see our How-To and Troubleshooting guides.

Fields and Attributes

forceInput

public bool forceInput = true;

This can only be set in the inspector and simply instructs the tool to force input to your App ID on start up and clear that on destruction. Typically this is only needed when running in the editor.

AutoUpdate

public static bool AutoUpdate { get; set; }

Indicates rather or not the system should automatically update all inputs for all controllers every frame. If this is set to false its up to you to call UpdateAll() or alternatively update each controller for each action individually.

Controllers

public InputHandle_t[] Controllers => get;

This reads the cashed input handles from Steam. This will default to null and gets refreshed on start of the manager. You can force this to be refreshed by calling RefreshControllers()

Methods

UpdateAll

public static void UpdateAll()

Refreshes all known inputs for all known controllers. This will cause change events to raise and the current InputActionData for every input to update.

If you have set Auto Update to true then this will be ran for you every frame.

RefreshControllers

public static void RefreshControllers()

Refreshes the list of known controllers. This is ran for you on start up but can be refreshed at any time such as when controllers are connected or disconnected from the game.

Last updated