-
Notifications
You must be signed in to change notification settings - Fork 331
DOCS: DOCATT-8754: Updated TrackedDevice class documentation #2298
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
base: develop
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr-agent |
PR Code Suggestions ✨Explore these optional code suggestions:
🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr-agent |
|||||||||
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## develop #2298 +/- ##
========================================
Coverage 77.95% 77.95%
========================================
Files 477 477
Lines 97416 97422 +6
========================================
+ Hits 75943 75949 +6
Misses 21473 21473 Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
| /// [Tracked Pose Driver](xref:input-system-tracked-input-devices#tracked-pose-driver) | ||
| /// component rather than being read directly from this class. | ||
| /// | ||
| /// Refer to the [Starter Assets](https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@latest/index.html?subfolder=/manual/samples-spatial-keyboard.html) |
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.
| /// Refer to the [Starter Assets](https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@latest/index.html?subfolder=/manual/samples-spatial-keyboard.html) | |
| /// Refer to the [Starter Assets](https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@latest/index.html?subfolder=/manual/samples-starter-assets.html) |
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.
I added the com.unity.xr.interaction.toolkit package to the projectMetadata.json file and used the xref id
| /// <remarks> | ||
| /// This property can contain a simple bit (1 or 0), but for some Open XR devices, this might | ||
| /// contain a float that includes bits that can indicate whether the device's position is actual | ||
| /// or inferred from its last-known [pose](xref:openxr-input#pose-data) (OpenXR Plugin package). |
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.
xref:openxr-input#pose-data doesn't seem to link correctly when I built the documentation. I think you'll have to edit the package's projectMetadata.json to add an xref tag for "com.unity.xr.openxr" for this to work.
| /// </summary> | ||
| /// <remarks> | ||
| /// This property can contain a simple bit (1 or 0), but for some Open XR devices, this might | ||
| /// contain a float that includes bits that can indicate whether the device's position is actual |
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.
I'm not sure we ever actually set this field to a float, I think it's always 0 or 1. The com.unity.xr.openxr package has existing documentation for isTracked and it doesn't indicate that we treat it as anything other than a bool.
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.
Thanks, I'll update this. It is a little confusing because the TrackedDevice.isTracked property returns a ButtonControl not a bool.
| /// or inferred from its last-known [pose](xref:openxr-input#pose-data) (OpenXR Plugin package). | ||
| /// | ||
| /// For more information about how the float represents inferred position vs. actual position in | ||
| /// OpenXR devices, refer to [Reference Spaces](https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#reference-spaces) |
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.
It might be better to use the newer 1.1 version of the OpenXR spec: https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#spaces-reference-spaces
| /// Indicates whether the input device is actively tracked or not. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// This property can contain a simple bit (1 or 0), but for some Open XR devices, this might |
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.
| /// This property can contain a simple bit (1 or 0), but for some Open XR devices, this might | |
| /// This property can contain a simple bit (1 or 0), but for some OpenXR devices, this might |
OpenXR doesn't have a space.
- Fixed some links, clarified isTracked return in TrackedDevice.cs - Added related XR packages to `xref` list in projectMetadata.json
Description
Added documentation for the
InputSystem.TrackedDeviceclass, particularly for the 4 properties. Several users had requested more information about these properties and their values, specifically theIntegerControlvalue in thetrackingStateproperty.Testing status & QA
No code was altered; documentation changes only. However, I did run the formatting tool and regenerated the documentation locally to test it.
Overall Product Risks
Very low risk (documentation only).
Comments to reviewers
I've requested a technical review from Chris Massie, who kindly provided me with some background on this class.
Checklist
DOCS: ___.