Skip to content

fix: UI drag simulation now keeps mouse position in sync during drags - #1658

Merged
hatayama merged 1 commit into
v3-betafrom
feat/port-stream-b-mouse-ui-position-sync
Jul 9, 2026
Merged

hatayama merged 1 commit into
v3-betafrom
feat/port-stream-b-mouse-ui-position-sync

Conversation

@hatayama

@hatayama hatayama commented Jul 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • UI mouse simulation (click, long-press, and drags) now keeps Mouse.current aligned with the simulated pointer position throughout the interaction.

User Impact

  • Previously, UI handlers that read Mouse.current directly (instead of only through PointerEventData) could observe a stale mouse position during simulated clicks and drags.
  • After this fix, both paths stay consistent, so gameplay code depending on Mouse.current behaves correctly during simulated UI interactions.

Changes

  • Ports main branch commit fbe9cd4 (fix: UI drags now keep game mouse coordinates in sync #1471) to v3-beta's split executor architecture (MouseUiPressActionExecutor, MouseUiDragEventExecutor).
  • Adds MouseUiInputSystemSync.SyncMousePosition, reusing the existing InputSystemUpdateHelper/InputUpdateTypeResolver helpers from Common/InputSystem.
  • Wires the sync call into the five coordinate-update sites: click, long-press, drag begin, and both branches of drag interpolation.

Verification

  • dist/darwin-arm64/uloop compile: success
  • dist/darwin-arm64/uloop run-tests --test-mode PlayMode: 92/92 passed (including 2 new regression tests)
  • dist/darwin-arm64/uloop run-tests --test-mode EditMode: 1726 passed, 0 failed, 7 skipped (pre-existing, unrelated)

Refs: main commit fbe9cd4 (#1471), Stream B of the main→v3-beta port plan

Review in cubic

…position

Ports main commit fbe9cd4 (#1471) to v3-beta's split executor architecture.
Click, LongPress, and both one-shot/incremental UI drags only updated
PointerEventData, so UI handlers reading Mouse.current directly (rather than
through PointerEventData) observed a stale position during simulation.

Added MouseUiInputSystemSync.SyncMousePosition, wired into the five
coordinate-update sites now split across MouseUiPressActionExecutor and
MouseUiDragEventExecutor, reusing the existing InputSystemUpdateHelper /
InputUpdateTypeResolver helpers from Common/InputSystem.
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@hatayama, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 18 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1072715e-8dcd-48d6-a000-62402a304c04

📥 Commits

Reviewing files that changed from the base of the PR and between ce5c364 and 7500f0a.

⛔ Files ignored due to path filters (3)
  • Assets/Tests/PlayMode/SimulateMouseUiInputSystemTests.cs.meta is excluded by none and included by none
  • Packages/src/Editor/FirstPartyTools/SimulateMouseUi/MouseUiInputSystemSync.cs.meta is excluded by none and included by none
  • Packages/src/Editor/FirstPartyTools/SimulateMouseUi/UnityCLILoop.FirstPartyTools.SimulateMouseUi.Editor.asmdef is excluded by none and included by none
📒 Files selected for processing (5)
  • Assets/Tests/PlayMode/SimulateMouseUiInputSystemTests.cs
  • Packages/src/Editor/FirstPartyTools/Common/InputSystem/AssemblyInfo.cs
  • Packages/src/Editor/FirstPartyTools/SimulateMouseUi/MouseUiDragEventExecutor.cs
  • Packages/src/Editor/FirstPartyTools/SimulateMouseUi/MouseUiInputSystemSync.cs
  • Packages/src/Editor/FirstPartyTools/SimulateMouseUi/MouseUiPressActionExecutor.cs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/port-stream-b-mouse-ui-position-sync

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hatayama
hatayama merged commit effbd78 into v3-beta Jul 9, 2026
10 checks passed
@hatayama
hatayama deleted the feat/port-stream-b-mouse-ui-position-sync branch July 9, 2026 08:17
@github-actions github-actions Bot mentioned this pull request Jul 11, 2026
RyanXie123 pushed a commit to RyanXie123/unity-cli-loop that referenced this pull request Sep 22, 2026
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.

1 participant