-
Notifications
You must be signed in to change notification settings - Fork 328
DOCS: Documentation edits for clarity, usability, and conformation to doc standards #2253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
unitALG
wants to merge
17
commits into
develop
Choose a base branch
from
docatt-substantial-doc-edits
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
84d68d3
Added missing UIDs to manual pages
unitALG 0d6fc6f
Normalized "NOTE" and "IMPORTANT" admonitions throughout docs
unitALG 84b9195
Merge branch 'develop' into docatt-manual-page-edits
unitALG bac9b88
Fixed two more irregular admonitions in ActionBindings.md
unitALG 1530297
Image fixes for consistency and web accessibility
unitALG 3e0f524
DOCATT-9373: Removed the incomplete sentence in the Canceled property
unitALG 69461db
DOCATT-8578: Merged repeated information on Control paths
unitALG 10e63ef
DOCATT-8537: Clarified the installation requirements
unitALG b520e21
Removed redundant mini-TOCs that appear on random pages
unitALG 13e4c94
Bulk-replaced all relative paths and links to Engine docs with xrefs
unitALG 3e3f4a1
DOCATT-8743: Edited PlayerInput class for clarity, made more explicit
unitALG 8e997c2
Ran reformatting tool
unitALG 15d1a64
Merge branch 'develop' into docatt-substantial-doc-edits
unitALG 397ba02
Merge branch 'develop' into docatt-substantial-doc-edits
unitALG 7724d42
Merge branch 'develop' into docatt-substantial-doc-edits
ekcoh a02dd90
Update PlayerInput.cs
ekcoh 538e346
Merge branch 'develop' into docatt-substantial-doc-edits
ekcoh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,27 +3,22 @@ uid: input-system-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 Actions](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](ProjectWideActions.md), 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](xref:project-wide-actions), 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. | ||
|
||
|
||
## Creating Input Action Assets | ||
|
||
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. | ||
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. | ||
|
||
## Editing Input Action Assets | ||
|
||
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. | ||
|
||
The Actions Editor which opens is identical to the [Actions Editor in the Project Settings window](ActionsEditor.md). | ||
The Actions Editor which opens is identical to the [Actions Editor in the Project Settings window](xref:input-system-configuring-input). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here we call it Actions Editor again. Just looking for what they should be called for consistency. |
||
|
||
|
||
## Using Input Action Assets | ||
|
@@ -90,21 +85,22 @@ 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 Browser and choose "Reimport". | ||
|
||
### Using Action Assets with `PlayerInput` | ||
|
||
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 [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. | ||
|
||
 | ||
|
||
### 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 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](xref:input-system-actions#creating-actions-in-code) and [Changing Bindings](xref:input-system-action-bindings#changing-bindings). | ||
|
||
|
||
### 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. | ||
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`](xref:UnityEngine.InputSystem.DefaultInputActions) class. | ||
|
||
```CSharp | ||
void Start() | ||
|
@@ -117,4 +113,5 @@ void Start() | |
} | ||
``` | ||
|
||
> __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. | ||
> [!NOTE] | ||
> This default actions asset is older than, and entirely separate from the [default project-wide actions](xref:project-wide-actions). It is a legacy asset that remains included in the package for backward compatibility. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We say "Action Asset" in this paragraph but "Input Action Asset" in the previous paragraph, shouldn't they be consistent?