DOCF-1072 restructured How Do I? page.#1658
Conversation
lyndon-unity
left a comment
There was a problem hiding this comment.
Overall looks like another good documentation change. Just a couple of questions.
(PS: I am not as familiar with the code sections so haven't reviewed those properly)
| Gamepad support guarantees the correct location and functioning of Controls across platforms and hardware. For example, a PS4 DualShock controller layout should look identical regardless of which platform it is supported on. A gamepad's south face button should always be the lowermost face button. | ||
|
|
||
| >NOTE: Generic [HID](./HID.md) gamepads will __not__ be surfaced as [`Gamepad`](../api/UnityEngine.InputSystem.Gamepad.html) devices but rather be created as generic [joysticks](./Joystick.md). This is because the Input System cannot guarantee correct mapping of buttons and axes on the controller (the information is simply not available at the HID level). Only HID gamepads that are explicitly supported by the Input System (like the PS4 controller) will come out as gamepads. Note that you can set up the same kind of support for specific HID gamepads yourself (see ["Overriding the HID Fallback"](./HID.md#overriding-the-hid-fallback)). | ||
| >NOTE: Generic [HID](./HID.md) gamepads will __not__ be surfaced as [`Gamepad`](../api/UnityEngine.InputSystem.Gamepad.html) devices but rather be created as generic [joysticks](./Joystick.md). This is because the Input System cannot guarantee correct mapping of buttons and axes on the controller (the information is simply not available at the HID level). Only HID gamepads that are explicitly supported by the Input System (like the PS4 controller) will come out as gamepads. Note that you can set up the same kind of support for specific HID gamepads yourself (see ["Overriding the HID Fallback"](./HID.md#creating-a-custom-device-layout)). |
There was a problem hiding this comment.
Given the page is renamed should the name 'overriding the HID fallback' be updated too?
| - [Example 2 - Create your own InputDevice class](#custom-device-workflow-example-2---create-your-own-inputdevice-class) | ||
| - [Example 3 - A more complex example using the PS4 DualShock Controller](#custom-device-workflow-example-3---ps4-dualshock-controller) | ||
|
|
||
| ### Custom Device Workflow Example 1 - Use an existing C# InputDevice |
There was a problem hiding this comment.
Some of this seems to be duplicated in https://docs.unity3d.com/Packages/com.unity.inputsystem@1.5/manual/Layouts.html
I wonder if we should/could remove some of this duplication
There was a problem hiding this comment.
We probably should, however this duplication must have already been present in the old How Do I page because I moved the information from there, so this is not a regression as such. If all the other errors are resolved, I'd like to get this PR merged in and I'll create a separate ticket to examine the de-duplication of material between this page and the layouts page.
lyndon-unity
left a comment
There was a problem hiding this comment.
Looking good new - just pending a review from James.
I've kicked the CI for the last unrelated failure
| // See InputDeviceChange reference for other event types. | ||
| break; | ||
| } | ||
| }; |
There was a problem hiding this comment.
semi-colon is required here
|
|
||
| namespace UnityEngine.InputSystem.XR | ||
| { | ||
| /// <summary> |
There was a problem hiding this comment.
Is this legal to move it inside the class body?
I was looking around and the language spec says they should proceed source code elements, but maybe you know something I don't here?
Description
Restructured How Do I page ( https://jira.unity3d.com/browse/DOCF-1072 )
Changes made
This PR tidies up the "How Do I" page by moving the answers to the correct location in the docs, and makes the questions links which point to the answers.