> For the complete documentation index, see [llms.txt](https://glass-vault-studio.gitbook.io/imove/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://glass-vault-studio.gitbook.io/imove/components/gvs-player-input.md).

# GVS Player Input

{% hint style="warning" %}
Never modify iMoves files directly. Make a copy of the Unity's new input system asset and use that instead of iMove's GVS\_iMoveInputActions. Store your copy somewhere in your project, not within the GVS folders. Modifying an original iMove file may result in your data being overridden when iMove pushes an update.
{% endhint %}

## GVS Player Input  <img src="https://2455864889-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAXfTdBipbBrJWcQRsEPv%2Fuploads%2FGs9TSYnqJqNN3Ny3EwU2%2Fimage.png?alt=media&amp;token=53a5ea9b-7520-4fe3-9a25-cc14c82fb518" alt="" data-size="line">

The GVS Player Input component is found on your player, and allows you to quickly bind inputs from Unity's New Input System to useful actions within iMove or any other component.&#x20;

## Bindings

To bind different inputs from Unity's new input system asset, simply drag and drop them into the default inputs UI.&#x20;

<div align="left"><figure><img src="https://2455864889-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAXfTdBipbBrJWcQRsEPv%2Fuploads%2FlrUiCVtLw1IbdCivVKOo%2Fimage.png?alt=media&amp;token=cc493afc-6ca7-4a21-9811-6720c55140b5" alt=""><figcaption></figcaption></figure></div>

## **Input Struct**

Default inputs can be accessed by code via the input struct. \
For example, to get the jump boolean: `bool test = GVS_Player_Input.Input.Jump`

## **Events**

There are Unity events for each default input. You can either access them via code `GVS_Player_Input.OnMovePressed.AddListener(YourMethodHere)` or by clicking the (+) button in the inspector, and assigning a method for when that event is called.&#x20;

Using the (+) button in the inspector is a great way to quickly add things like sounds to your actions.

## Toggle

By default, sprint and sneak have a toggle threshold of 0.25 seconds. This means that if you tap the sprint key once, it will toggle sprinting on. If you hold the sprint key longer than 0.25 seconds, the sprint will not toggle, but stay on until you release the key. To turn off toggling functionality, simply set the toggle threshold to 0.

## Custom Input Bindings

Custom input bindings can be used for anything you like. All you need to do is create an input action within Unity's new input system, then assign it to the custom binding. Make sure your custom binding matches the same variable type as your input action.

Here is an example of calling a custom iMove animation using a custom input binding:\
For more info on adding custom iMove animation actions, see [**this page**](/imove/getting-started/adding-custom-actions.md).

<div align="left"><figure><img src="https://2455864889-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAXfTdBipbBrJWcQRsEPv%2Fuploads%2FdM9fhuZDj7T0qXjkIWBO%2Fimage.png?alt=media&amp;token=9a0ca65d-4eed-4a91-8d25-29db0a988fb2" alt=""><figcaption></figcaption></figure></div>
