fix: Pause points on physics callbacks now explain a silent no-hit#1848
Merged
hatayama merged 1 commit intoJul 19, 2026
Conversation
Unity resolves a GameObject's physics message dispatch (OnCollisionEnter2D, OnTriggerEnter2D, etc.) at registration time, independent of later Harmony patches. A pause point on such a method silently misses any GameObject that already existed when the marker was enabled, even though the method body still runs on newly created instances. This was hard to diagnose because enable-pause-point and the wait timeout gave no indication of the cause. - Add SourcePausePointPhysicalMessageMethods to recognize the known physics message method names - Surface an informational warning from enable-pause-point when the resolved method is a physics message method on a MonoBehaviour-derived type - Extend the Go-side timeout hint with the same guidance, since the CLI only sees HitCount == 0 and cannot resolve the method identity itself
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (4)
📒 Files selected for processing (9)
📝 WalkthroughWalkthroughChangesAdds Unity physics callback detection to pause-point patching, emits warnings for affected Physics callback warning flow
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Test
participant SourcePausePointPatcher
participant SourcePausePointPhysicalMessageMethods
participant SourcePausePointConstants
Test->>SourcePausePointPatcher: patch resolved method
SourcePausePointPatcher->>SourcePausePointPhysicalMessageMethods: classify method name
SourcePausePointPhysicalMessageMethods-->>SourcePausePointPatcher: return match status
SourcePausePointPatcher->>SourcePausePointConstants: retrieve applicable warning
SourcePausePointConstants-->>SourcePausePointPatcher: return warning text
SourcePausePointPatcher-->>Test: return patch result and warning
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
hatayama
merged commit Jul 19, 2026
0e36f72
into
feature/pause-point-feedback-integration
2 checks passed
This was referenced Jul 20, 2026
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
OnCollisionEnter2D,OnTriggerEnter2D, etc.) can silently miss GameObjects that already existed when the marker was enabled.enable-pause-pointandawait-pause-pointnow surface a warning/hint explaining this instead of leaving the marker looking simply "never hit".User Impact
enable-pause-pointreturns an informational warning when the marker resolves to a physics message method on a MonoBehaviour, and a timed-outawait-pause-pointincludes the same guidance in its hint, along with the workaround (recreate the GameObject after enabling, or embedUloopPausePoint.Pause("id")directly in the method body).Changes
SourcePausePointPhysicalMessageMethods: recognizes the known Unity physics message method names (OnCollision*,OnTrigger*,OnParticleCollision).SourcePausePointPatcher: adds the warning when the resolved method matches a physics message name and its declaring type is MonoBehaviour-derived.pause_point_errors.go: extends the CLI-side timeout hint with the same guidance forHitCount == 0, since the CLI cannot resolve method identity itself.Verification
dist/darwin-arm64/uloop compile --project-path <repo>→ 0 errors / 0 warningsdist/darwin-arm64/uloop run-tests --project-path <repo> --filter-type regex --filter-value "PausePoint" --timeout-seconds 240→ 174/174 passedbash scripts/check-go-cli.sh→ 0 lint issues, all Go packages pass (includingproject-runner/internal/projectrunner)