Skip to content

Commit 3eff357

Browse files
committed
more WIP for Setting up input, actions section, DOCF-5905
1 parent 87c7ca1 commit 3eff357

18 files changed

+74
-47
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
* [Setting up input](setting-up-input.md)
1111
* [Actions](actions.md)
1212
* [Action Assets](action-assets.md)
13-
* [Create an Action Asset](create-action-asset.md)
13+
* [Create an Action Asset](create-empty-action-asset.md)
1414
* [Assign a project-wide Action Asset](assign-project-wide-actions.md)
1515
* [Default actions](default-actions.md)
16-
* [Create action maps](create-action-maps.md)
17-
* [Create actions](create-actions.md)
16+
* [Create action maps](create-edit-delete-action-maps.md)
17+
* [Create actions](create-edit-delete-actions.md)
1818
* [Stand-alone actions](stand-alone-actions.md)
1919
* [Load actions from JSON](load-actions-from-json.md)
2020
* [Create actions in code](create-actions-in-code.md)
@@ -29,7 +29,7 @@
2929
* [Devices](devices.md)
3030
* [Get information about devices](get-information-about-devices.md)
3131
* [Using the Input System]()
32-
* [Project-Wide Actions](ProjectWideActions.md)
32+
* [Project-Wide Actions](about-project-wide-actions.md)
3333
* [Configuring Input](ActionsEditor.md)
3434
* [Actions](Actions.md)
3535
* [Enabling Actions](enable-actions.md)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The three main UI solutions are **UI Toolkit**, **Unity UI**, and **IMGUI**. The
3030

3131
**For [**UI Toolkit**](https://docs.unity3d.com/Manual/UIElements.html), also known as "UI Elements" (an XML/CSS style UI solution):**
3232

33-
- From Unity 2023.2 and onwards, the UI actions defined in the default [project-wide actions](./ProjectWideActions.md) directly map to UI Toolkit input. You do not need to use the UI Input Module component.</br></br>
33+
- From Unity 2023.2 and onwards, the UI actions defined in the default [project-wide actions](./about-project-wide-actions.md) directly map to UI Toolkit input. You do not need to use the UI Input Module component.</br></br>
3434
- In versions of Unity prior to 2023.2, you must use the UI Input Module component to define which actions are passed through from the Input System to the UI.
3535

3636
**For [**Unity UI**](https://docs.unity3d.com/Packages/com.unity.ugui@latest), also known as "uGUI" (a GameObject and Component style UI solution):**
@@ -53,7 +53,7 @@ IMGUI|No|n/a
5353

5454
## Setting up UI input
5555

56-
The default [project-wide actions](./ProjectWideActions.md) comes with a "**UI**" Action Map, that contains all the actions required for UI interaction (shown in the image below). You can configure the bindings for these actions in the [Actions Editor](./ActionsEditor.md). Go to **Project Settings > Input System Package**, then select "**UI**" in the Action Maps column.
56+
The default [project-wide actions](./about-project-wide-actions.md) comes with a "**UI**" Action Map, that contains all the actions required for UI interaction (shown in the image below). You can configure the bindings for these actions in the [Actions Editor](./ActionsEditor.md). Go to **Project Settings > Input System Package**, then select "**UI**" in the Action Maps column.
5757

5858
![ProjectSettingsInputActionsUIActionMap](Images/ProjectSettingsInputActionsUIActionMap.png)
5959

Packages/com.unity.inputsystem/Documentation~/about-action-assets.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,10 @@
33

44
The Input System stores your configuration of [Input Actions](Actions.md) and their associated [Bindings](ActionBindings.md), [Action Maps](ActionsEditor.html#configure-action-maps) and [Control Schemes](ActionBindings.md#control-schemes) in an [Action Asset](ActionAssets.md) file. These Assets have the `.inputactions` file extension and are stored in a plain JSON format.
55

6-
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.
6+
The input system creates an Action Asset when you set up the [default project-wide actions](about-project-wide-actions.md), but you can also create new Action Assets directly in the Project window.
77

88
For most common scenarios, you do not need to use more than one Input Action Asset. This is because an Action Asset can contain multiple [Action Maps](ActionsEditor.html#configure-action-maps), which each containing a set of actions relevant to the various parts of your project (such as UI navigation, gameplay, etc).
99

10-
## Project-Wide Actions
11-
12-
You can assign an individual Action Asset to be available "project-wide", which means the actions within that asset are available more conveniently through the Input System API without needing to set up references to the asset.
13-
14-
When you [assign an Action Asset as project-wide](assign-project-wide-actions.md), it also becomes automatically [preloaded](https://docs.unity3d.com/ScriptReference/PlayerSettings.GetPreloadedAssets.html) when your app starts up, and is kept available until it terminates.
15-
16-
Unless you have specific project requirements that require more than one Action Asset, the recommended workflow is to use a single Action Asset assigned as the project-wide actions.
17-
1810
## Modifying Input Action Assets at runtime
1911
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).
2012

Packages/com.unity.inputsystem/Documentation~/ProjectWideActions.md renamed to Packages/com.unity.inputsystem/Documentation~/about-project-wide-actions.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
---
22
uid: project-wide-actions
33
---
4+
# Project-Wide Actions
45

6+
You can assign an individual Action Asset to be available "project-wide", which means the actions within that asset are available more conveniently through the Input System API without needing to set up references to the asset.
7+
8+
When you [assign an Action Asset as project-wide](assign-project-wide-actions.md), it also becomes automatically [preloaded](https://docs.unity3d.com/ScriptReference/PlayerSettings.GetPreloadedAssets.html) when your app starts up, and is kept available until it terminates.
9+
10+
Unless you have specific project requirements that require more than one Action Asset, the recommended workflow is to use a single Action Asset assigned as the project-wide actions.
511

612

713
## Edit project-wide actions

Packages/com.unity.inputsystem/Documentation~/action-properties.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,9 @@
22

33
Action properties are the details about an action which describe the type of control it relates to, as well as some optional properties such as Interactions and Processors assigned to the action.
44

5+
6+
## Action type and Control type
7+
8+
If you select an Action, you can edit its properties in the right-hand pane of the window:
9+
10+
![Action Properties](Images/ActionProperties.png)

Packages/com.unity.inputsystem/Documentation~/actions-editor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ It also allows you to define [Control Schemes](ActionBindings.md#control-schemes
1111

1212
### Action Assets and Project-Wide Actions
1313

14-
The typical workflow for most projects is to have a single Action Asset, which is assigned as the **project-wide actions**. If you have not yet created and assigned an Actions Asset as the project-wide actions, the recommended workflow is to do this first. Read more about [project-wide actions](ProjectWideActions.md).
14+
The typical workflow for most projects is to have a single Action Asset, which is assigned as the **project-wide actions**. If you have not yet created and assigned an Actions Asset as the project-wide actions, the recommended workflow is to do this first. Read more about [project-wide actions](about-project-wide-actions.md).
1515

1616
### Opening the Actions Editor
1717

Packages/com.unity.inputsystem/Documentation~/api-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ When scripting with Actions in the Input System, there are number of important A
55

66
|API name|Description|
77
|-----|-----------|
8-
|[`InputSystem.actions`](../api/UnityEngine.InputSystem.InputSystem.html)|A reference to the set of actions assigned as the [project-wide Actions](./ProjectWideActions.md).|
8+
|[`InputSystem.actions`](../api/UnityEngine.InputSystem.InputSystem.html)|A reference to the set of actions assigned as the [project-wide Actions](./about-project-wide-actions.md).|
99
|[`InputActionMap`](../api/UnityEngine.InputSystem.InputActionMap.html)|A named collection of Actions. The API equivalent to an entry in the "Action Maps" column of the [Input Actions editor](ActionsEditor.md).|
1010
|[`InputAction`](../api/UnityEngine.InputSystem.InputAction.html)|A named Action that can return the current value of the controls that it is bound to, or can trigger callbacks in response to input. The API equivalent to an entry in the "Actions" column of the [Input Actions editor](ActionsEditor.md).|
1111
|[`InputBinding`](../api/UnityEngine.InputSystem.InputBinding.html)|The relationship between an Action and the specific device controls for which it receives input. For more information about Bindings and how to use them, see [Action Bindings](ActionBindings.md).|
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Configure actions
2+
3+
Configuring an action covers all the ways an action can be set up, the controls it is bound to, and the ways it responds to signals from those controls.
4+
5+
An action's configuration includes its properties, bindings, controls, control schemes, and interactions, described in this section.
6+
7+
8+
| **Topic** | **Description** |
9+
| :------------------------------ | :------------------------------- |
10+
| **[Action Properties](action-properties.md)** | Summary |
11+
| **[Bindings](bindings.md)** | Summary |
12+
| **[Controls](controls.md)** | Summary |
13+
| **[Control Schemes](control-schemes.md)** | Summary |
14+
| **[Interactions](interactions.md)** | Summary |
15+
16+
## Additional resources
17+
18+
- [Actions Editor window reference](actions-editor.md)

Packages/com.unity.inputsystem/Documentation~/create-action-maps.md renamed to Packages/com.unity.inputsystem/Documentation~/create-edit-delete-action-maps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Create Action Maps
1+
# Create, Edit and Delete Action Maps
22

33
Action maps provide a way to group collections of Actions that represent different input scenarios in your project (such as UI navigation, gameplay, etc.)
44

Packages/com.unity.inputsystem/Documentation~/create-actions.md renamed to Packages/com.unity.inputsystem/Documentation~/create-edit-delete-actions.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,34 @@
11

2-
# Create Actions
2+
# Create, Edit and Delete Actions
33

4-
The simplest way to create actions is to use the [Input Actions editor](ActionsEditor.md) in the Project Settings window. This is the primary recommended workflow and suitable for most scenarios.
4+
The simplest way to create, edit or delete actions is to use the [Input Actions editor](ActionsEditor.md) in the Project Settings window. This is the primary recommended workflow and suitable for most scenarios.
55

6-
However there are many other ways to create actions which might suit less common scenarios. For example, by loading actions from JSON data, or creating actions entirely in code.
6+
However there are many other ways to work with actions which might suit less common scenarios. For example, by [loading actions from JSON data](load-actions-from-json.md), or [creating actions entirely in code](configure-input-directly-from-code.md).
77

8-
### Create Actions using the Action editor
8+
## Create Actions using the Action editor
99

1010
For information on how to create and edit Input Actions in the editor, see the [Input Actions editor](ActionsEditor.md). This is the recommended workflow if you want to organise all your input actions and bindings in one place, which applies across the whole of your project. This often the case for most types of game or app.
1111

1212
![Action Editor Window](Images/ProjectSettingsInputActionsSimpleShot.png)
1313
*The Input Actions Editor in the Project Settings window*
1414

1515

16-
### Adding, renaming, duplicating and deleting Actions
16+
### Add, rename, duplicate or delete actions
1717

1818
* To add a new Action, select the Add (+) icon in the header of the Action column.
1919
* To rename an existing Action, either long-click the name, or right-click the Action and select __Rename__ from the context menu.
2020
* To delete an existing Action, either right-click it and select __Delete__ from the context menu.
2121
* To duplicate an existing Action, either right-click it and select __Duplicate__ from the context menu.
2222

2323

24+
If you’d like to delete all the actions so that you can start from an empty configuration, you don’t need to delete the individual actions one-by-one. You can delete the each Action Map, which deletes all the Actions contained in the maps in one go.
25+
26+
You can also delete all action maps, or reset all the actions back to the default values from the **more** (⋮) menu at the top right of the Input Actions section of the settings window, below the Project Settings window search field.
27+
28+
![The Input Actions **more** menu as displayed in the Project Settings window](images/InputActionsSettingsMoreMenu.png)
29+
30+
> **Note:** this **more** (⋮) menu is only available in the Project Settings actions editor, and is not available when the Actions Editor is open in a separate window.
31+
2432

2533

2634

0 commit comments

Comments
 (0)