Skip to content

Commit 803b21d

Browse files
committed
WIP DOCF-5905
1 parent bdc7307 commit 803b21d

File tree

5 files changed

+11
-19
lines changed

5 files changed

+11
-19
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
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](about-project-wide-actions.md), but you can also create new Action Assets directly in the Project window.
6+
## Project-wide action assets
77

8-
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).
8+
The Input System creates an Action Asset when you set up the [default project-wide actions](about-project-wide-actions.md), which is the most common and recommended workflow, but you can also [create new empty Action Assets](./create-empty-action-asset.md) directly in the Project window.
99

10-
## Modifying Input Action Assets at runtime
11-
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).
10+
## Action maps
1211

12+
Actions assets allow you to group sets of related actions into [action maps](./create-edit-delete-action-maps.md). For example, in an open-world city game, you might create separate action maps for different situations such as exploring on foot, driving a car, flying an aircraft, or navigating UI interfaces. This means, for most common scenarios, you don't need to use more than one Input Action Asset.
1313

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
@@ -4,7 +4,7 @@ Action maps provide a way to group collections of Actions that represent differe
44

55
Actions must belong to an Action Map, therefore if you are starting with an empty Actions Asset, you must create an action map before you can create any actions.
66

7-
The Action Maps section of the Actions Editor allows you to create, rename, delete, and duplicate Action Maps.
7+
The Action Maps section on the left side of the [Actions Editor window](./actions-editor.md) allows you to create, rename, delete, and duplicate Action Maps.
88

99
* To add a new Action Map, select the Add (+) icon in the header of the Action Map panel.
1010
* To rename an existing Action Map, either long-click the name, or right-click the Action Map and select __Rename__ from the context menu. Note that Action Map names can't contain slashes (`/`).

Packages/com.unity.inputsystem/Documentation~/create-empty-action-asset.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Create an empty action asset
22

3-
Usually you only need one Action Asset, assigned as the project-wide actions. The input package provides a convenient way to [create a set of useful default actions and assign them as project-wide](assign-project-wide-actions.md). In other cases, you might want to start with an empty actions asset, or create more than one actions asset.
3+
Usually you only need one Action Asset, assigned as the project-wide actions. The input package provides a convenient way to [create a set of useful default actions and assign them as project-wide](assign-project-wide-actions.md) which is the most common and recommended workflow. In other cases, you might want to start with an empty actions asset, or create more than one actions asset.
44

55
To do this:
66

Packages/com.unity.inputsystem/Documentation~/create-project-wide-actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ If you don't yet have an Action Asset assigned as project-wide in your project,
99
![image alt text](./Images/InputSettingsNoProjectWideAsset.png)</br>
1010
*The Input System Package Project Settings with no project-wide actions assigned*
1111

12-
> **Note:** If you already have an Action Asset assigned, this button is not displayed, and instead the Actions Editor is displayed, allowing you to edit the project-wide actions.
12+
> **Note:** If you already have an Action Asset assigned, this button is not displayed, and instead the Actions Editor is displayed, allowing you to edit the currently assigned project-wide actions.
1313
1414
Click **"Create a new project-wide Action Asset"**.
1515

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

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,7 @@ These default actions mean that in many cases, you can start scripting with the
1111

1212
### The legacy default Actions Asset
1313

14-
The Input System Package also comes with an asset called `DefaultInputActions.inputactions` containing a default setup of Actions. This default actions asset is older than, and entirely separate from the default project-wide actions described above. It is a legacy asset that remains included in the package for backward compatibility. 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.
15-
16-
```CSharp
17-
void Start()
18-
{
19-
// Create an instance of the default actions.
20-
var actions = new DefaultInputActions();
21-
actions.Player.Look.performed += OnLook;
22-
actions.Player.Move.performed += OnMove;
23-
actions.Enable();
24-
}
25-
```
14+
The Input System Package also comes with an asset called `DefaultInputActions.inputactions` containing a default set of Actions. This default actions asset is older than, and entirely separate from the default project-wide actions described above.
15+
16+
This is a legacy asset that remains included in the package for backward compatibility only, and not recommended for use in new projects. It should not be confused with the default project-wide actions described above.
17+

0 commit comments

Comments
 (0)