Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ResetInputAxes()

Resets all input. After ResetInputAxes all axes return to 0 and all buttons return to 0 for one frame.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.InputLegacyModule
public static void ResetInputAxes()

Remarks

Note: This API is part of the legacy Input Manager. The recommended best practice is that you don't use this API in new projects. For new projects, use the Input System package. To learn more about input, refer to Input.
This can be useful when respawning the player and you don't want any input from keys that might still be held down.