Skip to content

chore(#336, #332): follow-ups from the #341–#343 review - #344

Merged
dfattal merged 4 commits into
DisplayXR:mainfrom
byungjul:chore/review-notes-341-343
Oct 2, 2026
Merged

dfattal merged 4 commits into
DisplayXR:mainfrom
byungjul:chore/review-notes-341-343

Conversation

@byungjul

@byungjul byungjul commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

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

  1. 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 above UpdateBakedHitColliders again. The Linux method keeps its own comment. No code change.

  2. 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.RoundToInt on x and on the flipped y (Screen.height - y), before PointerPosition and PointerDelta are computed. The y-flip is unchanged.

  3. 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 in DisplayXRWindowSpaceUI.cs. They now say each Local2D / window-space UI canvas gets its own stage from DisplayXROverlayStage: the first at (0,100000,0), the next ones 1000 units apart along x. Also added a note in DisplayXROverlayStage.cs that the spacing assumes each overlay camera's ortho half-width stays under 1000 world units.

  4. 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, and window-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.

  5. 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.

⚠️ Behaviour change

  • Linux only (item 2): PointerPosition and PointerDelta from DisplayXRTransparentOverlay are now whole pixels, like on macOS. Before, they could have fractional values on Linux.
  • No behaviour change on Windows or macOS.

Testing

  • No local compile (C# in a Unity package). I re-read the edits for syntax: the moved block keeps its #if UNITY_STANDALONE_LINUX && !UNITY_EDITOR / #endif pair, and Mathf is already available through using UnityEngine.
  • CI builds the native plugin as usual. No native files changed.

Part of #336, #332

🤖 Generated with Claude Code

byungjul and others added 4 commits October 2, 2026 14:27
…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>
@byungjul
byungjul requested a review from dfattal as a code owner October 2, 2026 05:30
@dfattal
dfattal merged commit 523b950 into DisplayXR:main Oct 2, 2026
8 checks passed
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.

2 participants