You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With isolated input actions enabled, OnScreenStick only accepted raycast hits on the stick’s root object. In dynamic origin mode the raycast actually hits the child DynamicOriginClickable graphic which leads to the stick to ignore the press and never re-center.
Fix is to treat raycast hits on any child of the stick as valid in isolated mode.
Testing status & QA
Manually verified with the repro steps provided in the case.
Overall Product Risks
Complexity: Low
Halo Effect: Low
Comments to reviewers
Checklist
Before review:
Changelog entry added.
Explains the change in Changed, Fixed, Added sections.
For API change contains an example snippet and/or migration example.
JIRA ticket linked, example (case %%). If it is a private issue, just add the case ID without a link.
Here are some key observations to aid the review process:
⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
The PR consists of a very small change (one line of logic) using standard Unity API, making it very easy to verify against the problem description.
🏅 Score: 95
The fix correctly addresses the hierarchy issue by using `IsChildOf` to allow interaction with child elements (like the dynamic origin graphic), which aligns with the PR description.
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected
Update review
🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr
Iterating through all raycast results causes the stick to be selectable even when obscured by other blocking UI elements (like popups or buttons). To respect UI occlusion and prevent "click-through" behavior, you should only validate the top-most raycast result.
-var stickSelected = false;-foreach (var result in m_RaycastResults)-{- if (!result.gameObject.transform.IsChildOf(transform)) continue;+// Check only the top-most element to respect UI occlusion+ var stickSelected = m_RaycastResults[0].gameObject.transform.IsChildOf(transform);- stickSelected = true;- break;-}-
Suggestion importance[1-10]: 8
__
Why: Iterating through all raycast results ignores UI occlusion, allowing the control to be activated through other blocking UI elements (like popups). Verifying only the top-most result ensures that the control respects occlusion, preventing unwanted click-through behavior.
Medium
More suggestions
🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr
❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
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
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.
Description
Bug: https://issuetracker.unity3d.com/issues/inputsystems-onscreenstick-behaves-differently-when-using-exactpositionwithdynamicorigin-and-isolated-input-actions-enabled-slash-disabled
With isolated input actions enabled,
OnScreenStickonly accepted raycast hits on the stick’s root object. In dynamic origin mode the raycast actually hits the childDynamicOriginClickablegraphic which leads to the stick to ignore the press and never re-center.Fix is to treat raycast hits on any child of the stick as valid in isolated mode.
Testing status & QA
Manually verified with the repro steps provided in the case.
Overall Product Risks
Comments to reviewers
Checklist
Before review:
Changed,Fixed,Addedsections.Area_CanDoX,Area_CanDoX_EvenIfYIsTheCase,Area_WhenIDoX_AndYHappens_ThisIsTheResult.During merge:
NEW: ___.FIX: ___.DOCS: ___.CHANGE: ___.RELEASE: 1.1.0-preview.3.