Skip to content

Commit fb786d2

Browse files
authored
DOCS: Fixed typos on Workflow-Actions.md (#2167)
1 parent 8b13d7d commit fb786d2

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Packages/com.unity.inputsystem/Documentation~/Workflow-Actions.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Once you have created and assigned the default project-wide actions, the Actions
2222

2323
The [Input Actions editor](ActionsEditor.html) provides a way to define and manage Actions which relate to what you want users to be able to do in your game or app. It also allows you to create bindings between your Actions and one or more types of control on various devices, such as a stick on a gamepad, a key on a keyboard, or a button on an XR controller.
2424

25-
Actions and Bindings allows you to separate the conceptual actions that you want in your game or app from the the specific decvices and controls that a player has to use to perform the actions, which can make your code simpler and more flexible. This is in contrast to [directly reading device states](Workflow-Direct.html) in your code, which can suit simple projects, but can become unwieldy and inflexible for more complex projects.
25+
Actions and Bindings allows you to separate the conceptual actions that you want in your game or app from the specific devices and controls that a player has to use to perform the actions, which can make your code simpler and more flexible. This is in contrast to [directly reading device states](Workflow-Direct.html) in your code, which can suit simple projects, but can become unwieldy and inflexible for more complex projects.
2626

2727
### The default Actions
2828

@@ -34,9 +34,9 @@ This means, in many cases, you can start scripting with the Input System without
3434

3535
There are various ways to access your actions from code. One of the simplest ways is to use the `FindAction` method.
3636

37-
`FindAction` allows you to search for an action by name from within the set of configured acations, and returns a reference which you can then either read the value directly (also called "polling"), or you can attach callback methods that are called the action is performed. The workflow described on this page focuses only on reading the action values. [You can read more about using callbacks here](RespondingToActions.html#action-callbacks).
37+
Use `FindAction` to search for an action by name from within the set of configured actions, and return a reference which you can then either read the value directly (also called "polling"), or you can attach callback methods that are called when the action is performed. The workflow described on this page focuses only on reading the action values. [You can read more about using callbacks here](RespondingToActions.html#action-callbacks).
3838

39-
> __Tip__: Finding and storing a reference to an Action is similar to finding and storing a reference to a Component, so if you have done that elsewhere in Unity, this may be a familiar process.
39+
> __Tip__: Finding and storing a reference to an Action is similar to finding and storing a reference to a Component, so if you have done that elsewhere in Unity, this might be a familiar process.
4040
4141
To use `FindAction` to get references to your Actions and read user input in your script, use the following steps:
4242

@@ -55,12 +55,12 @@ To use `FindAction` to get references to your Actions and read user input in you
5555
moveAction = InputSystem.actions.FindAction("Move");
5656
jumpAction = InputSystem.actions.FindAction("Jump");
5757

58-
1. In your Update() method, read the value from your action variables. This allows you to write code that reads the latest values coming from your Actions each frame and respond accordingly.<br/><br/>The way you read a value depends on the Action's **value type**. For example some actions may return a 1D or 2D axis value, and other actions may return a boolean true/false value. In this example, the "Move" action returns a 2D axis, and the "Jump" action returns a boolean.
58+
1. In your Update() method, read the value from your action variables. This allows you to write code that reads the latest values coming from your Actions each frame and respond accordingly.<br/><br/>The way you read a value depends on the Action's **value type**. For example some actions might return a 1D or 2D axis value, and other actions might return a Boolean true/false value. In this example, the **Move** action returns a 2D axis, and the **Jump** action returns a Boolean.
5959

6060
Vector2 moveValue = moveAction.ReadValue<Vector2>();
6161
bool jumpValue = jumpAction.IsPressed();
6262

63-
The example script below shows all these steps combined together into a single script:
63+
The following example script shows all these steps combined together into a single script:
6464

6565
```CSharp
6666
using UnityEngine;
@@ -95,14 +95,14 @@ public class Example : MonoBehaviour
9595
}
9696
```
9797

98-
> **Note:** You should avoid using `FindAction` in your Update() loop, because it performs a string-based lookup which could impact performance. This is why the Action refeferences in the example above are found during the Start() function, and stored in variables after finding them.
98+
> **Note:** You should avoid using `FindAction` in your `Update()` loop, because it performs a string-based lookup which could impact performance. This is why the Action references in the example above are found during the Start() function, and stored in variables after finding them.
9999
100-
> **Note:** The [InputSystem.actions](../api/UnityEngine.InputSystem.InputSystem.html) API refers specifically to the Action Asset assigned as the [project-wide actions](ProjectWideActions.md). Most projects only require one Action Asset, but if you are using more than one Action Asset, you must create a reference using the type InputActionAsset to the asset you wish to access.
100+
> **Note:** The [InputSystem.actions](../api/UnityEngine.InputSystem.InputSystem.html) API refers specifically to the Action Asset assigned as the [project-wide actions](ProjectWideActions.md). Most projects only require one Action Asset, but if you are using more than one Action Asset, you must create a reference using the type InputActionAsset to the asset you want to access.
101101
102102
## Pros and Cons
103103

104104
This is the recommended workflow with the Input System Package, providing a flexible but simple solution suitable for most projects.
105105

106-
You benefit from the Action-based features such as Action Maps, Bindings, and the ability to configure them in the Actions Editor. You can also implement [user rebinding at run time](ActionBindings.html#interactive-rebinding).
106+
You benefit from the Action-based features such as Action Maps, Bindings, and the ability to configure them in the Actions Editor. You can also implement [user rebinding at runtime](ActionBindings.html#interactive-rebinding).
107107

108-
This workflow alone doesn't provide built-in support for local multiplayer scenarios with multiple devices, so if you are producing a local multiplayer game you might want to consider using the [Actions & PlayerInput](./Workflow-PlayerInput.md) workflow.
108+
This workflow alone doesn't provide built-in support for local multiplayer scenarios with multiple devices, so if you are producing a local multiplayer game you might want to consider using the [Actions and PlayerInput](./Workflow-PlayerInput.md) workflow.

0 commit comments

Comments
 (0)