Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
84d68d3
Added missing UIDs to manual pages
unitALG Sep 19, 2025
0d6fc6f
Normalized "NOTE" and "IMPORTANT" admonitions throughout docs
unitALG Sep 23, 2025
84b9195
Merge branch 'develop' into docatt-manual-page-edits
unitALG Sep 23, 2025
bac9b88
Fixed two more irregular admonitions in ActionBindings.md
unitALG Sep 23, 2025
1530297
Image fixes for consistency and web accessibility
unitALG Sep 23, 2025
3e0f524
DOCATT-9373: Removed the incomplete sentence in the Canceled property
unitALG Sep 25, 2025
69461db
DOCATT-8578: Merged repeated information on Control paths
unitALG Sep 26, 2025
10e63ef
DOCATT-8537: Clarified the installation requirements
unitALG Sep 26, 2025
b520e21
Removed redundant mini-TOCs that appear on random pages
unitALG Sep 26, 2025
13e4c94
Bulk-replaced all relative paths and links to Engine docs with xrefs
unitALG Oct 2, 2025
3e3f4a1
DOCATT-8743: Edited PlayerInput class for clarity, made more explicit
unitALG Oct 3, 2025
8e997c2
Ran reformatting tool
unitALG Oct 3, 2025
15d1a64
Merge branch 'develop' into docatt-substantial-doc-edits
unitALG Oct 3, 2025
397ba02
Merge branch 'develop' into docatt-substantial-doc-edits
unitALG Oct 6, 2025
7724d42
Merge branch 'develop' into docatt-substantial-doc-edits
ekcoh Oct 14, 2025
a02dd90
Update PlayerInput.cs
ekcoh Oct 15, 2025
538e346
Merge branch 'develop' into docatt-substantial-doc-edits
ekcoh Oct 21, 2025
a0f111b
Merge branch 'develop' into docatt-substantial-doc-edits
unitALG Oct 23, 2025
597f34a
Follow-up edits for consistency after reviews
unitALG Oct 27, 2025
6ef249b
Merge branch 'develop' into docatt-substantial-doc-edits
unitALG Oct 27, 2025
b584e3a
Re-formatted changes in code samples in MD files
unitALG Oct 27, 2025
47d812d
Fixed typos and reorganized sections in Input Actions Editor page
unitALG Oct 27, 2025
b2df3dd
Merge branch 'develop' into docatt-substantial-doc-edits
unitALG Oct 28, 2025
a8f6233
Fixed failing tests for images:
unitALG Oct 28, 2025
adf863d
Merge branch 'develop' into docatt-substantial-doc-edits
unitALG Oct 28, 2025
bcf9dbf
Attempted to fix link errors reported by Windows functional tests
unitALG Oct 29, 2025
947fe8c
Test whether the NDA validation still fails with a relative path
unitALG Oct 29, 2025
e153008
Merge branch 'develop' into docatt-substantial-doc-edits
unitALG Oct 30, 2025
2d5ded3
Fixed missing xref: in link
unitALG Oct 30, 2025
c0e5886
Merge branch 'develop' into docatt-substantial-doc-edits
unitALG Oct 31, 2025
bc18942
Merge branch 'develop' into docatt-substantial-doc-edits
unitALG Nov 3, 2025
935d56f
Address failures in PVP-150-1
unitALG Nov 3, 2025
37b71c1
Fix Xmldoc issue (para tag doesn't work; use pure MD instead)
unitALG Nov 3, 2025
366e20b
Fix <summary> tag for isSinglePlayer
unitALG Nov 3, 2025
cfba3b4
Try to fix InputTestFixture remarks (code sample is mangled)
unitALG Nov 3, 2025
d526724
Removed links to methods in InputTestFixture (Windows can't find them)
unitALG Nov 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions Packages/com.unity.inputsystem/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ however, it has to be formatted properly to pass verification tests.
- Fixed issue of visual elements being null during editing project-wide actions in project settings which prompted console errors.
- Fixed case ISX-1436 (UI TK Input Action Asset Editor - Error deleting Bindings with DeleteKey on Windows).
- Fixed issue with UI Toolkit based Input Action Editor not restoring it's selected items after Domain Reload.
- Fixed the [`GetHapticCapabilitiesCommand`](xref:UnityEngine.InputSystem.XR.Haptics.GetHapticCapabilitiesCommand) always failing to execute due to a mismatch in the size in bytes of the payload and the size expected by XR devices. Changed [`HapticCapabilities`](xref:UnityEngine.InputSystem.XR.Haptics.HapticCapabilities) to include all properties returned by the XR input subsystem. This makes Input System match the functionality provided by the [XR](https://docs.unity3d.com/Manual/com.unity.modules.xr.html) module's [`InputDevice.TryGetHapticCapabilities`](https://docs.unity3d.com/ScriptReference/XR.InputDevice.TryGetHapticCapabilities.html) and [`HapticCapabilities`](https://docs.unity3d.com/ScriptReference/XR.HapticCapabilities.html).
- Fixed the [`GetHapticCapabilitiesCommand`](xref:UnityEngine.InputSystem.XR.Haptics.GetHapticCapabilitiesCommand) always failing to execute due to a mismatch in the size in bytes of the payload and the size expected by XR devices. Changed [`HapticCapabilities`](xref:UnityEngine.InputSystem.XR.Haptics.HapticCapabilities) to include all properties returned by the XR input subsystem. This makes Input System match the functionality provided by the [XR](https://docs.unity3d.com/Manual/com.unity.modules.xr.html) module's [`InputDevice.TryGetHapticCapabilities`](xref:UnityEngine.XR.InputDevice.TryGetHapticCapabilities(UnityEngine.XR.HapticCapabilities&)) and [`HapticCapabilities`](xref:UnityEngine.XR.HapticCapabilities).
- Fixed issue where deleting a binding in the Input Action Editor would usually result in an unexpected item being selected next.

## [1.8.0-pre.1] - 2023-09-04
Expand Down Expand Up @@ -1894,7 +1894,8 @@ This release includes a number of Quality-of-Life improvements for a range of co

- **The system no longer supports processing input in __BOTH__ fixed and dynamic updates**. Instead, a choice has to be made whether to process input before each `FixedUpdate()` or before each `Update()`.
* Rationale: the existing code that supported having both updates receive input independently still had several holes and became increasingly complex and brittle. Our solution was based on not actually processing input twice but on channeling input concurrently into both the state of both updates. Together with the fact that specific inputs have to reset (and possibly accumulate) correctly with respect to their update time slices, this became increasingly hard to do right. This, together with the fact that we've come to increasingly question the value of this feature, led us to removing the capability while preserving the ability to determine where input is processed.
* NOTE: Timeslicing is NOT affected by this. You can still switch to `ProcessEventInFixedUpdates` and get events timesliced to individual `FixedUpdate` periods according to their timestamps.
> [!NOTE]
> Timeslicing is NOT affected by this. You can still switch to `ProcessEventInFixedUpdates` and get events timesliced to individual `FixedUpdate` periods according to their timestamps.
* `InputSettings.UpdateMode.ProcessEventsInBothFixedAndDynamicUpdate` has been removed.
* `InputSettings.UpdateMode.ProcessEventsInDynamicUpdateOnly` has been renamed to `InputSettings.UpdateMode.ProcessEventsInDynamicUpdate` and is now the default.
* `InputSettings.UpdateMode.ProcessEventsInFixedUpdateOnly` has been renamed to `InputSettings.UpdateMode.ProcessEventsInFixedUpdate`.
Expand Down Expand Up @@ -2095,9 +2096,10 @@ This release includes a number of Quality-of-Life improvements for a range of co

## [0.2.6-preview] - 2019-03-20

>NOTE: The UI code for editing actions has largely been rewritten. There may be regressions.
>NOTE: The minimum version requirement for the new input system has been bumped
to 2019.1
> [!NOTE]
> The UI code for editing actions has largely been rewritten. There may be regressions.
>
> The minimum version requirement for the new input system has been bumped to 2019.1

### Added

Expand Down Expand Up @@ -2175,7 +2177,8 @@ This release includes a number of Quality-of-Life improvements for a range of co

This release contains a number of fairly significant changes. The focus has been on further improving the action system to make it easier to use as well as to make it work more reliably and predictably.

>NOTE: There are some breaking changes. Please see the "Changed" section below.
> [!NOTE]
> There are some breaking changes. Please see the "Changed" section below.

### Changed

Expand Down Expand Up @@ -2311,10 +2314,11 @@ This release contains a number of fairly significant changes. The focus has been

## [0.1.2-preview] - 2018-12-19

NOTE: The minimum version requirement for the new input system has been bumped
to 2018.3. The previous minum requirement of 2018.2 is no longer supported.
Also, we have dropped support for the .NET 3.5 runtime. The new .NET 4
runtime is now required to use the new input system.
> [!NOTE]
> The minimum version requirement for the new input system has been bumped
> to 2018.3. The previous minum requirement of 2018.2 is no longer supported.
> Also, we have dropped support for the .NET 3.5 runtime. The new .NET 4
> runtime is now required to use the new input system.

We've started working on documentation. The current work-in-progress can be found on [GitHub](https://github.com/Unity-Technologies/InputSystem/blob/develop/Packages/com.unity.inputsystem/Documentation~/InputSystem.md).

Expand Down
74 changes: 36 additions & 38 deletions Packages/com.unity.inputsystem/Documentation~/ActionAssets.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,53 @@
---
uid: input-system-action-assets
---
# Input Action Assets
# Input action assets

- [Creating Input Action Assets](#creating-input-action-assets)
- [Editing Input Action Assets](#editing-input-action-assets)
- [Using Input Action Assets](#using-input-action-assets)
- [Type-safe C# API Generation](#type-safe-c-api-generation)
An input action asset is an asset which contains a set of [input action](xref:input-system-actions) definitions and their associated [Bindings](xref:input-system-action-bindings) and [control schemes](xref:input-system-action-bindings#control-schemes). These assets have the `.inputactions` file extension and are stored in a plain JSON format.

An Input Action Asset is an Asset which contains a set of [Input Actions](Actions.md) definitions and their associated [Bindings](ActionBindings.md) and [Control Schemes](ActionBindings.md#control-schemes). These Assets have the `.inputactions` file extension and are stored in a plain JSON format.
The input system creates an action asset when you set up the [default project-wide actions](xref:project-wide-actions), but you can also create new action assets directly in the Project window.

The input system creates an Action Asset when you set up the [default project-wide actions](ProjectWideActions.md), but you can also create new Action Assets directly in the Project window.
For most common scenarios, you do not need to use more than one input action asset. It is usually simpler to configure your project-wide action definition in the Project Settings window.

For most common scenarios, you do not need to use more than one Input Action Asset. It is usually simpler to configure your project-wide action definition in the Project Settings window.

## Creating input action assets

## Creating Input Action Assets
To create an asset that contains [input actions](xref:input-system-actions) in Unity, right-click in the __Project__ window or go to __Assets > Create > Input Actions__ from Unity's main menu.

To create an Asset that contains [Input Actions](Actions.md) in Unity, right-click in the __Project__ window or go to __Assets > Create > Input Actions__ from Unity's main menu.
## Editing input action assets

## Editing Input Action Assets
To open the Input Actions Editor, double-click an `.inputactions` asset in the Project Browser, or select the __Edit Asset__ button in the Inspector for that asset. You can have more than one editor window open at the same time, but not for the same asset.

To bring up the Action editor, double-click an `.inputactions` Asset in the Project Browser, or select the __Edit Asset__ button in the Inspector for that Asset. You can have more than one editor window open at the same time, but not for the same Asset.
This Input Actions Editor is identical to the one that opens in the [Project Settings window](xref:input-system-configuring-input).

The Actions Editor which opens is identical to the [Actions Editor in the Project Settings window](ActionsEditor.md).

## Using input action assets

## Using Input Action Assets

## Type-safe C# API generation

## Type-safe C# API Generation
Input action assets allow you to **generate a C# class** from your action definitions, so you can refer to your actions in a type-safe manner from code. This means you can avoid looking up your actions by string.

Input Action Assets allow you to **generate a C# class** from your action definitions, which allow you to refer to your actions in a type-safe manner from code. This means you can avoid looking up your actions by string.
### Auto-generating script code for actions

### Auto-generating script code for Actions
One of the most convenient ways to work with `.inputactions` assets in scripts is to automatically generate a C# wrapper class for them. This provides an easier way to set up callbacks and avoid manually looking up actions and action maps by name.

One of the most convenient ways to work with `.inputactions` Assets in scripts is to automatically generate a C# wrapper class for them. This removes the need to manually look up Actions and Action Maps using their names, and also provides an easier way to set up callbacks.
To enable this option, enable the __Generate C# Class__ property in the input action asset's Inspector, then select __Apply__.

To enable this option, tick the __Generate C# Class__ checkbox in the importer properties in the Inspector of the `.inputactions` Asset, then select __Apply__.

![MyPlayerControls Importer Settings](Images/FireActionInputAssetInspector.png)
![The input action asset's Inspector window displays the enabled Generate C# Class property with default values for the C# class's file, name, and namespace settings.](Images/FireActionInputAssetInspector.png)

You can optionally choose a path name, class name, and namespace for the generated script, or keep the default values.

This generates a C# script that simplifies working with the Asset.
This generates a C# script that simplifies working with the asset.

```CSharp
using UnityEngine;
using UnityEngine.InputSystem;

// IGameplayActions is an interface generated from the "gameplay" action map
// we added (note that if you called the action map differently, the name of
// the interface will be different). This was triggered by the "Generate Interfaces"
// checkbox.
// IGameplayActions is an interface generated from the newly added "gameplay"
// action map, triggered by the "Generate Interfaces" checkbox. Note that if
// you change the default values for the action map, the name of the interface
// will be different.
public class MyPlayerScript : MonoBehaviour, IGameplayActions
{
// MyPlayerControls is the C# class that Unity generated.
Expand All @@ -65,8 +60,8 @@ public class MyPlayerScript : MonoBehaviour, IGameplayActions
if (controls == null)
{
controls = new MyPlayerControls();
// Tell the "gameplay" action map that we want to get told about
// when actions get triggered.
// Tell the "gameplay" action map that we want to be
// notified when actions get triggered.
controls.gameplay.SetCallbacks(this);
}
controls.gameplay.Enable();
Expand All @@ -90,21 +85,26 @@ public class MyPlayerScript : MonoBehaviour, IGameplayActions
}
```

>__Note__: To regenerate the .cs file, right-click the .inputactions asset in the Project Browser and choose "Reimport".
> [!NOTE]
> To regenerate the .cs file, right-click the .inputactions asset in the Project window and choose "Reimport".

### Using action assets with `PlayerInput`

### Using Action Assets with `PlayerInput`
The [Player Input](xref:input-system-player-input) component provides a convenient way to handle input for one or multiple players. You can assign your action asset to the Player Input component so that it can then automatically handle activating action maps and selecting control schemes for you.

The [Player Input](PlayerInput.md) component provides a convenient way to handle input for one or multiple players. You can assign your Action Asset to the Player Input component so that it can then automatically handle activating Action Maps and selecting Control Schemes for you.
![The PlayerInput component appears with Player set as the Default Map and the Behavior set to Invoke Unity Events.](Images/PlayerInput.png)

![PlayerInput](Images/PlayerInput.png)
### Modifying input action assets at runtime

### Modifying Input Action Assets at runtime
There are several ways to modify an Input Action Asset at runtime. Any modifications that you make during Play mode to an Input Action Asset do not persist in the Input Action Asset after you exit Play mode. This means you can test your application in a realistic manner in the Editor without having to worry about inadvertently modifying the asset. For examples on how to modify an Input Action Asset, see the documentation on [Creating Actions in code](Actions.md#creating-actions-in-code) and [Changing Bindings](ActionBindings.md#changing-bindings).
There are several ways to modify an input action asset at runtime. Any modifications that you make during Play mode to an input action asset do not persist in the asset after you exit Play mode. This means you can test your application in a realistic way in the Editor without having to worry about inadvertently modifying the asset. For examples on how to modify an input action asset, refer to [Create actions in code](xref:input-system-actions#create-actions-in-code) and [Change Bindings](xref:input-system-action-bindings#change-bindings).


### The Default Actions Asset
### The default actions asset

An asset called `DefaultInputActions.inputactions` containing a default setup of Actions comes with the Input System Package. You can reference this asset directly in your projects like any other Unity asset. However, the asset is also available in code form through the [`DefaultInputActions`](../api/UnityEngine.InputSystem.DefaultInputActions.html) class.
> [!NOTE]
> The default actions asset is entirely separate from the [default project-wide actions](xref:project-wide-actions). It is a legacy asset that is included in the package for backwards compatibility.

The Input System package provides an asset called `DefaultInputActions.inputactions` which you can reference directly in your projects like any other Unity asset. The asset is also available in code form through the [`DefaultInputActions`](xref:UnityEngine.InputSystem.DefaultInputActions) class.

```CSharp
void Start()
Expand All @@ -116,5 +116,3 @@ void Start()
actions.Enable();
}
```

> __Note:__ This default actions asset is older than, and entirely separate from the [default project-wide actions](ProjectWideActions.md). It is a legacy asset that remains included in the package for backward compatibility.
Loading