-
Notifications
You must be signed in to change notification settings - Fork 314
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
DOCS: Update Gamepad documentation #2073
base: develop
Are you sure you want to change the base?
Conversation
Addresses most issues to be solved in Docs Quality Week 2024 December
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.
Seems like there are more work to do unfortunately, see dry-run CI job:
PVP-150-1: UnityEngine.InputSystem.Gamepad: void OnAdded(): in block context (only allowed in top-level context)
PVP-150-1: UnityEngine.InputSystem.Gamepad: void OnRemoved(): in block context (only allowed in top-level context)
PVP-150-1: UnityEngine.InputSystem.Gamepad: void PauseHaptics(): in block context (only allowed in top-level context)
PVP-150-1: UnityEngine.InputSystem.Gamepad: void PauseHaptics(): tag inside
PVP-150-1: UnityEngine.InputSystem.Gamepad: void ResumeHaptics(): in block context (only allowed in top-level context)
PVP-150-1: UnityEngine.InputSystem.Gamepad: void ResumeHaptics(): tag inside
PVP-150-1: UnityEngine.InputSystem.Gamepad: void ResetHaptics(): in block context (only allowed in top-level context)
PVP-150-1: UnityEngine.InputSystem.Gamepad: void ResetHaptics(): tag inside
Will follow up on errors next.
Missed those, will fix them as soon as I understand them :D |
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.
LGTM, nice code examples
Packages/com.unity.inputsystem/InputSystem/Devices/Haptics/DualMotorRumble.cs
Outdated
Show resolved
Hide resolved
<inheritdoc cref> can only be used as a top-level xml tag. Since it is not possible to inherit code examples, I went ahead with the guidelines for API Package Documentation.
The |
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.
LGTM, only one minor comment - Despite CI seems to fail, approving to unblock you
/// // Rumble the left motor on the current gamepad slightly. | ||
/// Gamepad.current.SetMotorSpeeds(0.2f, 0. | ||
/// </code> | ||
/// <code source="../../DocCodeSamples.Tests/GamepadExample.cs" /> |
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.
cool! That is handy!
Description
Documentation fixes
Updates Gamepad documentation based on Unity Package API Quality Standards by addressing Score Explanation issues:
Reusability of code examples improvement
This PR follows the approach mentioned in https://docs.unity.com/internal/content-ops/en-us/documentation/content-model/code-snippets-examples.
Many packages such as the Localization and Entities packages follow this convention. I'm throwing the first rock for our package :D
Also, see the Slack thread for more insights in this approach, so that I could fix PVP problems.
I'm open for deeper improvements in follow-up PRs but this seems like a good way forward for now.
Let me know your thoughts.
Testing status & QA
Docs build on my machine.
Overall Product Risks
None
Comments to reviewers
Please let me know of any inconsistencies and improvements I should do.
Also, let me know if the approach to reuse code samples in the folder
DocCodeSamples
is ok.Checklist
Before review:
During merge:
NEW: ___
.FIX: ___
.DOCS: ___
.CHANGE: ___
.RELEASE: 1.1.0-preview.3
.After merge: