Skip to content

DOCF-1072 restructured How Do I? page.#1658

Merged
lyndon-unity merged 13 commits intodevelopfrom
DOCF-1072-restructure-how-do-i-page
Apr 4, 2023
Merged

DOCF-1072 restructured How Do I? page.#1658
lyndon-unity merged 13 commits intodevelopfrom
DOCF-1072-restructure-how-do-i-page

Conversation

@duckets
Copy link
Copy Markdown
Contributor

@duckets duckets commented Mar 10, 2023

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.

@duckets duckets requested a review from jamesmcgill March 16, 2023 13:42
Copy link
Copy Markdown
Collaborator

@lyndon-unity lyndon-unity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Comment thread Packages/com.unity.inputsystem/Documentation~/HID.md Outdated
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)).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread Packages/com.unity.inputsystem/Documentation~/HowDoI.md
Copy link
Copy Markdown
Collaborator

@lyndon-unity lyndon-unity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broken links need fixing
Specifically

create-my-own-custom-devices
create-a-ui-to-rebind-input-in-my-game

References in Debugging.md, joystick.md and supportedDevices.md need updating

Comment thread Packages/com.unity.inputsystem/InputSystem/Plugins/XR/GenericXRDevice.cs Outdated
@duckets duckets changed the title DOCF-1072 restructured most of How Do I? page. DOCF-1072 restructured How Do I? page. Mar 31, 2023
@lyndon-unity lyndon-unity self-requested a review April 3, 2023 09:54
Copy link
Copy Markdown
Collaborator

@lyndon-unity lyndon-unity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
}
};
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

semi-colon is required here


namespace UnityEngine.InputSystem.XR
{
/// <summary>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@lyndon-unity lyndon-unity merged commit df3aa91 into develop Apr 4, 2023
@lyndon-unity lyndon-unity deleted the DOCF-1072-restructure-how-do-i-page branch April 4, 2023 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants