Repository navigation
chore(#336, #332): follow-ups from the #341–#343 review - #344
Merged
Merged
Conversation
…bove it The Linux UpdatePointerFromInputSystem() method (DisplayXR#343) was inserted between UpdateBakedHitColliders' doc comment and the method, so the comment read as if it described the new method. Move the Linux method above the comment. No code change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The macOS path rounds the cursor to whole window-client pixels (Mathf.RoundToInt on x and on the flipped y) before computing PointerPosition and PointerDelta; the Linux path (DisplayXR#343) did not, so Linux reported fractional pixels. Round the same way. Linux only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…0000,0) Since DisplayXR#342 every Local2D / window-space UI canvas gets its own stage from DisplayXROverlayStage (first at (0,100000,0), then 1000 units apart along x). The WindowSpaceUI sample README and router comment, window-space-ui.md and a leftover comment in DisplayXRWindowSpaceUI still said every canvas sits at (0,100000,0). Also note in DisplayXROverlayStage that the spacing assumes an overlay camera ortho half-width under 1000 world units. Comment/doc only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Several DisplayXRWindowSpaceUI components are composited in slot order (lowest slot at the bottom), and each takes the lowest free slot on enable, so the draw order of overlapping HUDs follows enable/disable history, not anything the app sets. Document that (class doc, the slot-acquire comment, window-space-ui.md), advise keeping HUDs from overlapping, and note that under the DisplayXR shell only the first window-space layer is composited. Doc only, no behaviour change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-ups from David's review of #341, #342 and #343. These are comment and doc changes only, except item 2, which changes the Linux pointer values. No
native~/changes.Review notes and what changed
fix(#332): DisplayXRTransparentOverlay pointer properties on Linux #343: the new method sat between
UpdateBakedHitColliders' doc comment and the method.Moved the Linux
UpdatePointerFromInputSystem()above that comment, so the comment is directly aboveUpdateBakedHitCollidersagain. The Linux method keeps its own comment. No code change.fix(#332): DisplayXRTransparentOverlay pointer properties on Linux #343: Linux pointer values aren't rounded (macOS rounds).
The Linux path now rounds the same way as the macOS path:
Mathf.RoundToInton x and on the flipped y (Screen.height - y), beforePointerPositionandPointerDeltaare computed. The y-flip is unchanged.fix: overlay canvases bleed into each other; wsui blank under the URP foreground clip #342: the comments still say every canvas sits at (0,100000,0).
Updated the WindowSpaceUI sample README, the mouse router's header comment,
docs~/architecture/window-space-ui.md, and an old comment inDisplayXRWindowSpaceUI.cs. They now say each Local2D / window-space UI canvas gets its own stage fromDisplayXROverlayStage: the first at (0,100000,0), the next ones 1000 units apart along x. Also added a note inDisplayXROverlayStage.csthat the spacing assumes each overlay camera's ortho half-width stays under 1000 world units.feat(#336): several window-space UI layers at once (wsui slots) #341: stacking order follows the slot index, not anything the app controls.
Doc lines only, no behaviour change (class doc and slot-acquire comment in
DisplayXRWindowSpaceUI.cs, andwindow-space-ui.md). Several HUDs are composited in slot order, lowest slot at the bottom. A HUD takes the lowest free slot when it is enabled, so overlapping HUDs can stack in any order (enable A, enable B, disable A, enable C: C takes slot 0 and draws under B). Keep HUDs from overlapping. Also noted that under the DisplayXR shell (workspace tile) the runtime composites only the first window-space layer, so only the lowest-slot HUD shows there.feat(#336): several window-space UI layers at once (wsui slots) #341 PR text said it falls back to the slot-less API.
The code does not fall back. If the slot export is missing, it logs a warning and window-space UI stays disabled. I edited the feat(#336): several window-space UI layers at once (wsui slots) #341 description to match. I also corrected the line about a fifth HUD: it is not hidden for good, it retries about once a second and shows up when a slot is free. There is an "Edit" note at the end of that description.
PointerPositionandPointerDeltafromDisplayXRTransparentOverlayare now whole pixels, like on macOS. Before, they could have fractional values on Linux.Testing
#if UNITY_STANDALONE_LINUX && !UNITY_EDITOR/#endifpair, andMathfis already available throughusing UnityEngine.Part of #336, #332
🤖 Generated with Claude Code