Skip to content

Commit 5303c66

Browse files
author
Rene Damm
authored
DOC: Tech writer review (#947, #955).
1 parent 6ae2acc commit 5303c66

32 files changed

+409
-410
lines changed

Packages/com.unity.inputsystem/Documentation~/ActionAssets.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ An Input Action Asset is an Asset containing [Input Actions](Actions.md) as well
88

99
## Creating Input Action Assets
1010

11-
To create an Asset containing [Input Acions](Actions.md) in Unity, right-click in the __Project__ window or go to __Assets > Create > Input Actions__ in Unity's main menu.
11+
To create an Asset containing [Input Actions](Actions.md) in Unity, right-click in the __Project__ window or go to __Assets > Create > Input Actions__ from Unity's main menu.
1212

1313
## Editing Input Action Assets
1414

15-
To bring up the Action editor, double-click an `.inputactions` asset in the Project Browser or click 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.
15+
To bring up the Action editor, double-click an `.inputactions` Asset in the Project Browser, or click 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.
1616

1717
![Action Editor Window](Images/MyGameActions.png)
1818

@@ -24,7 +24,7 @@ By default, Unity doesn't save edits you make in the Action Asset window when yo
2424

2525
>__Note__: This setting affects all `.inputactions` Assets, and persists across Unity Editor sessions.
2626
27-
The editor window is divided into three panes.
27+
The editor window is divided into three panes:
2828

2929
1. The left pane lists the Action Maps in the Asset. Each Map is a collection of Actions that you can enable or disable in bulk.
3030
2. The middle pane contains the Actions in the currently selected Action Map, and the bindings associated with each Action.
@@ -34,16 +34,16 @@ Use the following keyboard shortcuts to quickly trigger common operations:
3434

3535
|Shortcut (Mac)|Shortcut (Windows)|Description|
3636
|--------------|------------------|-----------|
37-
|⌘X, ⌘C, ⌘V|Ctrl-X, Ctrl-C, Ctrl-V|Cut, Copy and Paste. Can be used on Actions, Action Maps and Bindings.|
38-
|⌘D|Ctrl-D|Duplicate. Can be used on Actions, Action Maps and Bindings.|
39-
|⌘⌫|Del|Delete. Can be used on Actions, Action Maps and Bindings.|
37+
|⌘X, ⌘C, ⌘V|Ctrl-X, Ctrl-C, Ctrl-V|Cut, Copy, and Paste. Can be used on Actions, Action Maps, and Bindings.|
38+
|⌘D|Ctrl-D|Duplicate. Can be used on Actions, Action Maps, and Bindings.|
39+
|⌘⌫|Del|Delete. Can be used on Actions, Action Maps, and Bindings.|
4040
|⌥S|Alt-S|Save.|
4141
|⌥M|Alt-M|Add Action Map.|
4242
|⌥A|Alt-A|Add Action.|
4343
|⌥B|Alt-B|Add Binding.|
4444

4545

46-
>__Tip__: You can search for Devices and/or Control Schemes directly from the search box. For example, "d:gamepad" filters for bindings to gamepad Devices, whereas "g:gamepad" filters for bindings in the "gamepad" Control Scheme. Matching is case-insensitive and will match any partial name.
46+
>__Tip__: You can search for Devices and/or Control Schemes directly from the search box. For example, "d:gamepad" filters for bindings to gamepad Devices, whereas "g:gamepad" filters for bindings in the "gamepad" Control Scheme. Matching is case-insensitive and matches any partial name.
4747
4848
### Editing Action Maps
4949

@@ -52,7 +52,7 @@ Use the following keyboard shortcuts to quickly trigger common operations:
5252
>__Note__: Action Map names can't contain slashes (`/`).
5353
5454
* To add a new Action Map, click the plus icon in the header of the Action Map column.
55-
* To rename an existing Action Map, either long-click the name, or right-click the action map and select __Rename__ from the context menu.
55+
* To rename an existing Action Map, either long-click the name, or right-click the Action Map and select __Rename__ from the context menu.
5656
* To delete an existing Action Map, either right-click it and select __Delete__ from the context menu, or use the Delete key (Windows) / ⌘⌫ (Mac).
5757
* To duplicate an existing Action Map, either right-click it and select __Duplicate__ from the context menu, or use Ctrl-D (Windows) / ⌘D (Mac).
5858

@@ -81,7 +81,7 @@ If you select a Binding, you can edit its properties in the right-hand pane of t
8181

8282
#### Picking Controls
8383

84-
The most important property of any Binding is the [control path](Controls.md#control-paths) it's bound to. To edit it, open the __Path__ drop-down list. This will pop up a Control picker window.
84+
The most important property of any Binding is the [control path](Controls.md#control-paths) it's bound to. To edit it, open the __Path__ drop-down list. This pops up a Control picker window.
8585

8686
![Control Picker](Images/InputControlPicker.png)
8787

@@ -131,8 +131,8 @@ using UnityEngine.InputSystem;
131131
// checkbox.
132132
public class MyPlayerScript : MonoBehaviour, IGameplayActions
133133
{
134-
// MyPlayerControls is the C# class that has been generated for us.
135-
// It encapsulates the data from the .inputactions asset we created
134+
// MyPlayerControls is the C# class that Unity generated.
135+
// It encapsulates the data from the .inputactions asset we created
136136
// and automatically looks up all the maps and actions for us.
137137
MyPlayerControls controls;
138138

@@ -168,6 +168,6 @@ public class MyPlayerScript : MonoBehaviour, IGameplayActions
168168

169169
### Using Action Assets with `PlayerInput`
170170

171-
The [`PlayerInput`](Components.md#playerinput-component) component provides a convenient way to handle input for one or multiple players. It requires you to set up all your Actions in an Input Action Asset, which you can then assign to the [`PlayerInput`](Components.md#playerinput-component) component. [`PlayerInput`](Components.md#playerinput-component) can then automatically handle activating Action Maps and selecting Control Schemes for you. Check the documentation on [GameObject Components for Input](Components.md) to learn more.
171+
The [`PlayerInput`](Components.md#playerinput-component) component provides a convenient way to handle input for one or multiple players. It requires you to set up all your Actions in an Input Action Asset, which you can then assign to the [`PlayerInput`](Components.md#playerinput-component) component. [`PlayerInput`](Components.md#playerinput-component) can then automatically handle activating Action Maps and selecting Control Schemes for you. To learn more, see the documentation on [GameObject Components for Input](Components.md).
172172

173173
![PlayerInput](Images/PlayerInput.png)

Packages/com.unity.inputsystem/Documentation~/ActionBindings.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# Input Bindings
22

3-
An [`InputBinding`](../api/UnityEngine.InputSystem.InputBinding.html) represents a connection between an [Action](Actions.md) and one or more [Controls](Controls.md) identified by a [Control path](Controls.md#control-paths). An Action have an arbitrary number of Bindings pointed at it. Multiple Bindings can reference the same Control.
3+
An [`InputBinding`](../api/UnityEngine.InputSystem.InputBinding.html) represents a connection between an [Action](Actions.md) and one or more [Controls](Controls.md) identified by a [Control path](Controls.md#control-paths). An Action can have an arbitrary number of Bindings pointed at it. Multiple Bindings can reference the same Control.
44

55
Each Binding has the following properties:
66

77
|Property|Description|
88
|--------|-----------|
99
|[`path`](../api/UnityEngine.InputSystem.InputBinding.html#UnityEngine_InputSystem_InputBinding_path)|[Control path](Controls.md#control-paths) that identifies the control(s) from which the Action should receive input.<br><br>Example: `"<Gamepad>/leftStick"`|
10-
|[`overridePath`](../api/UnityEngine.InputSystem.InputBinding.html#UnityEngine_InputSystem_InputBinding_overridePath)|[Control path](Controls.md#control-paths) that overrides `path`. Unlike `path`, `overridePath` is not persistent, meaning that it can be used to non-destructively override the path on a Binding. If it is set to something other than null, it will take effect and override `path`. If you want to get the path which is currently being used (that is either `path` or `overridePath`), you can query the [`effectivePath`](../api/UnityEngine.InputSystem.InputBinding.html#UnityEngine_InputSystem_InputBinding_effectivePath) property.|
10+
|[`overridePath`](../api/UnityEngine.InputSystem.InputBinding.html#UnityEngine_InputSystem_InputBinding_overridePath)|[Control path](Controls.md#control-paths) that overrides `path`. Unlike `path`, `overridePath` is not persistent, so you can use it to non-destructively override the path on a Binding. If it's set to something other than null, it will take effect and override `path`. If you want to get the path which is currently being used (that is either `path` or `overridePath`), you can query the [`effectivePath`](../api/UnityEngine.InputSystem.InputBinding.html#UnityEngine_InputSystem_InputBinding_effectivePath) property.|
1111
|[`action`](../api/UnityEngine.InputSystem.InputBinding.html#UnityEngine_InputSystem_InputBinding_action)|The name or ID of the Action that the Binding should trigger. Note that this can be null or empty (for instance, for [composites](#composite-bindings)). Case-insensitive.<br><br>Example: `"fire"`|
1212
|[`groups`](../api/UnityEngine.InputSystem.InputBinding.html#UnityEngine_InputSystem_InputBinding_groups)|A semicolon-separated list of Binding groups that the Binding belongs to. Can be null or empty. Binding groups can be anything, but are mostly used for [Control Schemes](#control-schemes). Case-insensitive.<br><br>Example: `"Keyboard&Mouse;Gamepad"`|
1313
|[`interactions`](../api/UnityEngine.InputSystem.InputBinding.html#UnityEngine_InputSystem_InputBinding_interactions)|A semicolon-separated list of [Interactions](Interactions.md) to apply to input on this Binding. Note that Unity appends Interactions applied to the [Action](Actions.md) itself (if any) to this list. Case-insensitive.<br><br>Example: `"slowTap;hold(duration=0.75)"`|
14-
|[`processors`](../api/UnityEngine.InputSystem.InputBinding.html#UnityEngine_InputSystem_InputBinding_processors)|A semicolon-separated list of [Processors](Processors.md) to apply to input on this Binding. Note that Unity appends Processors applied to the [Action](Actions.md) itself (if any) to this list. Case-insensitive.<br><br>Processors applied to Bindings apply in addition to Processors applied to Controls that are providing values. If, for example, you put a `stickDeadzone` Processor on a Binding and then bind it to `<Gamepad>/leftStick`, you will get deadzones applied twice: once from the deadzone Processor sitting on the `leftStick` Control and once from the Binding.<br><br>Example: `"invert;axisDeadzone(min=0.1,max=0.95)"`|
14+
|[`processors`](../api/UnityEngine.InputSystem.InputBinding.html#UnityEngine_InputSystem_InputBinding_processors)|A semicolon-separated list of [Processors](Processors.md) to apply to input on this Binding. Note that Unity appends Processors applied to the [Action](Actions.md) itself (if any) to this list. Case-insensitive.<br><br>Processors applied to Bindings apply in addition to Processors applied to Controls that are providing values. If, for example, you put a `stickDeadzone` Processor on a Binding and then bind it to `<Gamepad>/leftStick`, you will get deadzones applied twice: once from the deadzone Processor sitting on the `leftStick` Control, and once from the Binding.<br><br>Example: `"invert;axisDeadzone(min=0.1,max=0.95)"`|
1515
|[`id`](../api/UnityEngine.InputSystem.InputBinding.html#UnityEngine_InputSystem_InputBinding_id)|Unique ID of the Binding. You can use it to identify the Binding when storing Binding overrides in user settings, for example.|
1616
|[`name`](../api/UnityEngine.InputSystem.InputBinding.html#UnityEngine_InputSystem_InputBinding_name)|Optional name of the Binding. Most importantly used to identify part names inside [Composites](#composite-bindings).<br><br>Example: `"Positive"`|
1717
|[`isComposite`](../api/UnityEngine.InputSystem.InputBinding.html#UnityEngine_InputSystem_InputBinding_isComposite)|Whether the Binding acts as a [Composite](#composite-bindings).|
1818
|[`isPartOfComposite`](../api/UnityEngine.InputSystem.InputBinding.html#UnityEngine_InputSystem_InputBinding_isPartOfComposite)|Whether the Binding is part of a [Composite](#composite-bindings).|
1919

20-
You can query the Bindings to a particular Action using [`InputAction.bindings`](../api/UnityEngine.InputSystem.InputAction.html#UnityEngine_InputSystem_InputAction_bindings). You can also query a flat list of Nindings for all Actions in an Action Map using [`InputActionMap.bindings`](../api/UnityEngine.InputSystem.InputActionMap.html#UnityEngine_InputSystem_InputActionMap_bindings).
20+
You can query the Bindings to a particular Action using [`InputAction.bindings`](../api/UnityEngine.InputSystem.InputAction.html#UnityEngine_InputSystem_InputAction_bindings). You can also query a flat list of Bindings for all Actions in an Action Map using [`InputActionMap.bindings`](../api/UnityEngine.InputSystem.InputActionMap.html#UnityEngine_InputSystem_InputActionMap_bindings).
2121

2222
## Composite Bindings
2323

@@ -107,11 +107,11 @@ In addition, you can set the following parameters on a 2D vector Composite:
107107

108108
|Parameter|Description|
109109
|---------|-----------|
110-
|[`normalize`](../api/UnityEngine.InputSystem.Composites.Vector2Composite.html#UnityEngine_InputSystem_Composites_Vector2Composite_normalize)|Whether the resulting vector should be normalized or not. If this is disabled, then, for example, pressing both [`up`](../api/UnityEngine.InputSystem.Composites.Vector2Composite.html#UnityEngine_InputSystem_Composites_Vector2Composite_up) and [`right`](../api/UnityEngine.InputSystem.Composites.Vector2Composite.html#UnityEngine_InputSystem_Composites_Vector2Composite_right) will yield a vector `(1,1)` which has a length greater than 1. This can be undesirable in situations where the vector's magnitude matters (for example, when scaling running speed by the length of the input vector).<br><br>This is true by default.|
110+
|[`normalize`](../api/UnityEngine.InputSystem.Composites.Vector2Composite.html#UnityEngine_InputSystem_Composites_Vector2Composite_normalize)|Whether the resulting vector should be normalized or not. If this is disabled, then, for example, pressing both [`up`](../api/UnityEngine.InputSystem.Composites.Vector2Composite.html#UnityEngine_InputSystem_Composites_Vector2Composite_up) and [`right`](../api/UnityEngine.InputSystem.Composites.Vector2Composite.html#UnityEngine_InputSystem_Composites_Vector2Composite_right) yields a vector `(1,1)` which has a length greater than 1. This can be undesirable in situations where the vector's magnitude matters (for example, when scaling running speed by the length of the input vector).<br><br>This is true by default.|
111111

112112
### Button with one modifier
113113

114-
A Composite that requires another button to be held when pressing the button that triggers the Action. Implemented in the [`ButtonWithOneModifier`](../api/UnityEngine.InputSystem.Composites.ButtonWithOneModifier.html) class. This is useful, for example, to represent keyboard shortcuts such as Ctrl+1 but isn't restricted to keyboard controls. The buttons can be on any Device, and can be toggle buttons or full-range buttons such as gamepad triggers.
114+
A Composite that requires another button to be held when pressing the button that triggers the Action. Implemented in the [`ButtonWithOneModifier`](../api/UnityEngine.InputSystem.Composites.ButtonWithOneModifier.html) class. This is useful, for example, to represent keyboard shortcuts such as Ctrl+1, but isn't restricted to keyboard controls. The buttons can be on any Device, and can be toggle buttons or full-range buttons such as gamepad triggers.
115115

116116
The result is a `float`.
117117

@@ -133,7 +133,7 @@ This Composite has no parameters.
133133

134134
### Button with two modifiers
135135

136-
A Composite that requires two other buttons to be held when pressing the button that triggers the Action. Implemented in the [`ButtonWithTwoModifiers`](../api/UnityEngine.InputSystem.Composites.ButtonWithTwoModifiers.html) class. This is useful, for example, to represent keyboard shortcuts such as "Ctrl+Shift+1" but isn't restricted to keyboard controls. The buttons can be on any Device, and can be toggle buttons or full-range buttons such as gamepad triggers.
136+
A Composite that requires two other buttons to be held when pressing the button that triggers the Action. Implemented in the [`ButtonWithTwoModifiers`](../api/UnityEngine.InputSystem.Composites.ButtonWithTwoModifiers.html) class. This is useful, for example, to represent keyboard shortcuts such as Ctrl+Shift+1, but isn't restricted to keyboard controls. The buttons can be on any Device, and can be toggle buttons or full-range buttons such as gamepad triggers.
137137

138138
The result is a `float`.
139139

@@ -173,7 +173,7 @@ To define a new type of Composite, create a class based on [`InputBindingComposi
173173
public class CustomComposite : InputBindingComposite<float>
174174
{
175175
// Each part binding is represented as a field of type int and annotated with
176-
// InputControlAttribute. Setting "layout" allows to restrict the controls that
176+
// InputControlAttribute. Setting "layout" restricts the controls that
177177
// are made available for picking in the UI.
178178
//
179179
// On creation, the int value will be set to an integer identifier for the binding
@@ -285,7 +285,7 @@ If multiple Controls are bound to an Action, the Input System monitors input fro
285285

286286
Unity decides which Control is currently driving the Action in a process called disambiguation. During the disambiguation process, the Input System looks at the value of each Control bound to an Action. If the [magnitude](Controls.md#control-actuation) of the input from any Control is higher then the magnitude of the Control currently driving the Action, then the Control with the higher magnitude becomes the new Control driving the Action. In the above example of `<Gamepad>/leftStick` binding to multiple gamepads, the Control driving the Action is the left stick which is actuated the furthest of all the gamepads. You can query which Control is currently driving the Action by checking the [`InputAction.CallbackContext.control`](../api/UnityEngine.InputSystem.InputAction.CallbackContext.html#UnityEngine_InputSystem_InputAction_CallbackContext_control) property in an [Action callback](Actions.md#started-performed-and-canceled-callbacks).
287287

288-
If you don't want your Action to perform disambiguation, you can set your Action type to [Pass-Through](Actions.md#pass-through). Pass-Through Actions skip disambiguation, changes to any bound Control trigger them. The value of a Pass-Through Action is the value of whichever bound Control changed most recently.
288+
If you don't want your Action to perform disambiguation, you can set your Action type to [Pass-Through](Actions.md#pass-through). Pass-Through Actions skip disambiguation, and changes to any bound Control trigger them. The value of a Pass-Through Action is the value of whichever bound Control changed most recently.
289289

290290
## Initial state check
291291

0 commit comments

Comments
 (0)