DOCS: Change "see" to "refer to"#2404
Conversation
Change instances of "see" to "refer to" to match our style guide.
There was a problem hiding this comment.
The documentation review has identified several technical inaccuracies and minor editorial issues. The main findings include incorrect API usage in migration examples and conceptual errors regarding input action types. Additionally, several typos and formatting inconsistencies were found across multiple documentation files.
🤖 Helpful? 👍/👎
| [`Input.gyro`](https://docs.unity3d.com/ScriptReference/Input-gyro.html)|The `UnityEngine.Gyroscope` class is replaced by multiple separate sensor Devices in the new Input System:<br/>[`Gyroscope`](xref:UnityEngine.InputSystem.Gyroscope) to measure angular velocity.<br/>[`GravitySensor`](xref:UnityEngine.InputSystem.GravitySensor) to measure the direction of gravity.<br/>[`AttitudeSensor`](xref:UnityEngine.InputSystem.AttitudeSensor) to measure the orientation of the device.<br/>[`Accelerometer`](xref:UnityEngine.InputSystem.Accelerometer) to measure the total acceleration applied to the device.<br/>[`LinearAccelerationSensor`](xref:UnityEngine.InputSystem.LinearAccelerationSensor) to measure acceleration applied to the device, compensating for gravity. | ||
| [`Input.gyro.attitude`](https://docs.unity3d.com/ScriptReference/Gyroscope-attitude.html)|[`AttitudeSensor.current.orientation.ReadValue()`](xref:UnityEngine.InputSystem.AttitudeSensor). | ||
| [`Input.gyro.enabled`](https://docs.unity3d.com/ScriptReference/Gyroscope-enabled.html)|Get: `Gyroscope.current.enabled`<br/>Set:<br/>`EnableDevice(Gyroscope.current);`<br/>`DisableDevice(Gyroscope.current);`<br/><br/>__Note__: The new Input System replaces `UnityEngine.Gyroscope` with multiple separate sensor devices. Substitute [`Gyroscope`](xref:UnityEngine.InputSystem.Gyroscope) with other sensors in the sample as needed. See the notes for `Input.gyro` above for details. | ||
| [`Input.gyro.enabled`](https://docs.unity3d.com/ScriptReference/Gyroscope-enabled.html)|Get: `Gyroscope.current.enabled`<br/>Set:<br/>`EnableDevice(Gyroscope.current);`<br/>`DisableDevice(Gyroscope.current);`<br/><br/>__Note__: The new Input System replaces `UnityEngine.Gyroscope` with multiple separate sensor devices. Substitute [`Gyroscope`](xref:UnityEngine.InputSystem.Gyroscope) with other sensors in the sample as needed. Refer to the notes for `Input.gyro` above for details. |
There was a problem hiding this comment.
The mapping for Input.gyro.enabled contains technical errors. InputDevice (and thus Gyroscope) does not have an enabled property; instead, you should use InputSystem.IsDeviceEnabled(device). Additionally, the EnableDevice and DisableDevice methods are static members of the InputSystem class and should be prefixed accordingly for the snippet to be valid code.
| [`Input.gyro.enabled`](https://docs.unity3d.com/ScriptReference/Gyroscope-enabled.html)|Get: `Gyroscope.current.enabled`<br/>Set:<br/>`EnableDevice(Gyroscope.current);`<br/>`DisableDevice(Gyroscope.current);`<br/><br/>__Note__: The new Input System replaces `UnityEngine.Gyroscope` with multiple separate sensor devices. Substitute [`Gyroscope`](xref:UnityEngine.InputSystem.Gyroscope) with other sensors in the sample as needed. Refer to the notes for `Input.gyro` above for details. | |
| Get: `InputSystem.IsDeviceEnabled(Gyroscope.current)`<br/>Set:<br/>`InputSystem.EnableDevice(Gyroscope.current);`<br/>`InputSystem.DisableDevice(Gyroscope.current);`<br/><br/>__Note__: The new Input System replaces `UnityEngine.Gyroscope` with multiple separate sensor devices. Substitute [`Gyroscope`](xref:UnityEngine.InputSystem.Gyroscope) with other sensors in the sample as needed. Refer to the notes for `Input.gyro` above for details. |
🤖 Helpful? 👍/👎
| #### Button | ||
|
|
||
| This is very similar to [`Value`](xref:UnityEngine.InputSystem.InputActionType.Value), but [`Button`](xref:UnityEngine.InputSystem.InputActionType.Button) type Actions can only be bound to [`ButtonControl`](xref:UnityEngine.InputSystem.Controls.ButtonControl) Controls, and don't perform an initial state check like [`Value`](xref:UnityEngine.InputSystem.InputActionType.Value) Actions do (see the Value section above). Use this for inputs that trigger an Action once every time they are pressed. The initial state check is usually not useful in such cases, because it can trigger actions if the button is still held down from a previous press when the Action was enabled. | ||
| This is very similar to [`Value`](xref:UnityEngine.InputSystem.InputActionType.Value), but [`Button`](xref:UnityEngine.InputSystem.InputActionType.Button) type Actions can only be bound to [`ButtonControl`](xref:UnityEngine.InputSystem.Controls.ButtonControl) Controls, and don't perform an initial state check like [`Value`](xref:UnityEngine.InputSystem.InputActionType.Value) Actions do (refer to the Value section above). Use this for inputs that trigger an Action once every time they are pressed. The initial state check is usually not useful in such cases, because it can trigger actions if the button is still held down from a previous press when the Action was enabled. |
There was a problem hiding this comment.
The statement that Button type Actions can only be bound to ButtonControl Controls is incorrect. In the Input System, Button actions can be bound to any control that can be represented as a float (such as an axis or a stick magnitude). The system uses the press threshold to determine the interaction state for non-button controls.
| This is very similar to [`Value`](xref:UnityEngine.InputSystem.InputActionType.Value), but [`Button`](xref:UnityEngine.InputSystem.InputActionType.Button) type Actions can only be bound to [`ButtonControl`](xref:UnityEngine.InputSystem.Controls.ButtonControl) Controls, and don't perform an initial state check like [`Value`](xref:UnityEngine.InputSystem.InputActionType.Value) Actions do (refer to the Value section above). Use this for inputs that trigger an Action once every time they are pressed. The initial state check is usually not useful in such cases, because it can trigger actions if the button is still held down from a previous press when the Action was enabled. | |
| This is very similar to [`Value`](xref:UnityEngine.InputSystem.InputActionType.Value), but [`Button`](xref:UnityEngine.InputSystem.InputActionType.Button) type Actions don't perform an initial state check like [`Value`](xref:UnityEngine.InputSystem.InputActionType.Value) Actions do (refer to the Value section above). Use this for inputs that trigger an Action once every time they are pressed. The initial state check is usually not useful in such cases, because it can trigger actions if the button is still held down from a previous press when the Action was enabled. |
🤖 Helpful? 👍/👎
| ## <a name="linearaccelerationsensor"></a>[`LinearAccelerationSensor`](xref:UnityEngine.InputSystem.LinearAccelerationSensor) | ||
|
|
||
| Use the accelerometer to measure the acceleration of a device. This is useful to control content by moving a device around. Linear acceleration is the acceleration of a device unaffected by gravity. This is usually derived from a hardware `Accelerometer`, by subtracting the effect of gravity (see `GravitySensor`). Values are affected by the [__Compensate Orientation__](xref:input-system-settings#compensate-orientation) setting. | ||
| Use the accelerometer to measure the acceleration of a device. This is useful to control content by moving a device around. Linear acceleration is the acceleration of a device unaffected by gravity. This is usually derived from a hardware `Accelerometer`, by subtracting the effect of gravity (refer to `GravitySensor`). Values are affected by the [__Compensate Orientation__](xref:input-system-settings#compensate-orientation) setting. |
There was a problem hiding this comment.
This description appears to be a copy-paste error from the Accelerometer section. In the context of the LinearAccelerationSensor documentation, the text should refer to the linear acceleration sensor rather than the raw accelerometer, as the latter includes the effect of gravity and is a separate device type.
| Use the accelerometer to measure the acceleration of a device. This is useful to control content by moving a device around. Linear acceleration is the acceleration of a device unaffected by gravity. This is usually derived from a hardware `Accelerometer`, by subtracting the effect of gravity (refer to `GravitySensor`). Values are affected by the [__Compensate Orientation__](xref:input-system-settings#compensate-orientation) setting. | |
| Use the linear acceleration sensor to measure the acceleration of a device. This is useful to control content by moving a device around. Linear acceleration is the acceleration of a device unaffected by gravity. This is usually derived from a hardware `Accelerometer`, by subtracting the effect of gravity (refer to `GravitySensor`). Values are affected by the [__Compensate Orientation__](xref:input-system-settings#compensate-orientation) setting. |
🤖 Helpful? 👍/👎
| Refer to [Supported Devices](SupportedDevices.html) for more information about devices supported by the input system, and the API to read their states. | ||
|
|
||
| For more a more flexible workflow, see the [Actions Workflow](Workflow-Actions.html). | ||
| For more a more flexible workflow, refer to the [Actions Workflow](Workflow-Actions.html). |
There was a problem hiding this comment.
There is a typo in this line: "For more a more flexible workflow". It should probably be "For a more flexible workflow".
| For more a more flexible workflow, refer to the [Actions Workflow](Workflow-Actions.html). | |
| For a more flexible workflow, refer to the [Actions Workflow](Workflow-Actions.html). |
🤖 Helpful? 👍/👎
| > [!NOTE] | ||
| > Currently, when using project-wide actions all the action maps are enabled by default. It is advisible to manually disable them and manually enable the default map that **Player Input** during `Start()`. | ||
| 3. Set up Action responses, by selecting a **Behavior** type from the Behavior menu. The Behavior type you select affects how you should implement the methods that handle your Action responses. See the [notification behaviors](#notification-behaviors) section further down for details.<br/><br/><br/><br/> | ||
| 3. Set up Action responses, by selecting a **Behavior** type from the Behavior menu. The Behavior type you select affects how you should implement the methods that handle your Action responses. Refer to the [notification behaviors](#notification-behaviors) section further down for details.<br/><br/><br/><br/> |
There was a problem hiding this comment.
There is an extra space between "the" and "[notification behaviors]".
| 3. Set up Action responses, by selecting a **Behavior** type from the Behavior menu. The Behavior type you select affects how you should implement the methods that handle your Action responses. Refer to the [notification behaviors](#notification-behaviors) section further down for details.<br/><br/><br/><br/> | |
| 3. Set up Action responses, by selecting a **Behavior** type from the Behavior menu. The Behavior type you select affects how you should implement the methods that handle your Action responses. Refer to the [notification behaviors](#notification-behaviors) section further down for details.<br/><br/><br/><br/> |
🤖 Helpful? 👍/👎
| @@ -40,7 +40,7 @@ To get started using the Player Input component, use the following steps: | |||
| 2. Assign your [Action Asset](xref:input-system-action-assets) to the **Actions** field. This is usually the default project-wide action asset named "InputSystem_Actions" | |||
| > [!NOTE] | |||
| > Currently, when using project-wide actions all the action maps are enabled by default. It is advisible to manually disable them and manually enable the default map that **Player Input** during `Start()`. | |||
There was a problem hiding this comment.
Have you considered fixing the typo "advisible" to "advisable"? Also, the end of the sentence appears to be missing a verb; it should likely be "...the default map that Player Input uses during Start()." or similar.
| > Currently, when using project-wide actions all the action maps are enabled by default. It is advisible to manually disable them and manually enable the default map that **Player Input** during `Start()`. | |
| > Currently, when using project-wide actions all the action maps are enabled by default. It is advisable to manually disable them and manually enable the default map that **Player Input** uses during `Start()`. |
🤖 Helpful? 👍/👎
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## develop #2404 +/- ##
===========================================
- Coverage 77.92% 77.40% -0.52%
===========================================
Files 482 483 +1
Lines 97755 98577 +822
===========================================
+ Hits 76175 76306 +131
- Misses 21580 22271 +691
Flags with carried forward coverage won't be shown. Click here to find out more. |
Change instances of "see" to "refer to" to match our style guide.
Description
Makes minor copy edits.
Testing status & QA
N/A - docs-only change
Overall Product Risks
Please rate the potential complexity and halo effect from low to high for the reviewers. Note down potential risks to specific Editor branches if any.
Comments to reviewers
I was comparing Claude with Cursor and used the Input System documentation as a test. If this PR is useful, please feel free to review it. If it conflicts with your in-progress work, please reject it, and I'll close it. Thank you!
Checklist
Before review:
Changed,Fixed,Addedsections.Area_CanDoX,Area_CanDoX_EvenIfYIsTheCase,Area_WhenIDoX_AndYHappens_ThisIsTheResult.During merge:
NEW: ___.FIX: ___.DOCS: ___.CHANGE: ___.RELEASE: 1.1.0-preview.3.