chore: Add Unity 6000.5 package compile compatibility check#1840
Conversation
Run package compilation checks against both the minimum supported Unity version and Unity 6000.5 so incompatible APIs and dependency resolution failures are detected before v3-beta merges.\n\nUse an isolated Unity 6000.5 fixture, version-specific Library caches, and package-scoped diagnostics while preserving the existing 2022.3 checks and required-status skip behavior.
📝 WalkthroughWalkthroughThe pull request adds Unity 6.0.4+ API and object-identifier compatibility, expands Unity compile checks into a version matrix, improves diagnostic log validation, and registers the 6000.5 project against the local package source. ChangesUnity compatibility and validation
Estimated code review effort: 3 (Moderate) | ~25 minutes 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 |
Use the EntityId-based API on Unity 6000.4 and newer while preserving the existing integer pause-point response contract. Keep the legacy API only on older Unity versions so Unity 6000.5 treats the compatibility path as supported code.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Packages/src/Editor/FirstPartyTools/Screenshot/UIElementAnnotator.cs`:
- Around line 125-129: Update the UNITY_6000_4_OR_NEWER branch in the
allBehaviours initialization to call Object.FindObjectsByType<MonoBehaviour>
with FindObjectsSortMode.None. Leave the legacy
Object.FindObjectsOfType<MonoBehaviour>() branch unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a1dc12c6-2daf-437e-848d-c69d9e9aa7ee
⛔ Files ignored due to path filters (3)
Packages/src/Editor/ToolContracts/UnityObjectIdentifier.cs.metais excluded by none and included by noneci/unity-projects/6000.5/Assets/.gitkeepis excluded by none and included by noneci/unity-projects/6000.5/ProjectSettings/ProjectVersion.txtis excluded by none and included by none
📒 Files selected for processing (11)
.github/workflows/unity-compile-check-and-test-runner.ymlPackages/src/Editor/FirstPartyTools/Common/MouseUi/UiRaycastHelper.csPackages/src/Editor/FirstPartyTools/Common/Overlay/OverlayCanvasFactory.csPackages/src/Editor/FirstPartyTools/ExecuteDynamicCode/DynamicCompilation/AssemblyBuilderFallbackCompilerBackend.csPackages/src/Editor/FirstPartyTools/PausePoint/SourcePausePointUnityObjectClassifier.csPackages/src/Editor/FirstPartyTools/PausePoint/SourcePausePointVariableFormatter.csPackages/src/Editor/FirstPartyTools/Screenshot/RaycastAnnotation/RaycastGridAnnotator.csPackages/src/Editor/FirstPartyTools/Screenshot/UIElementAnnotator.csPackages/src/Editor/FirstPartyTools/SimulateMouseUi/MouseUiPointerTargetResolver.csPackages/src/Editor/ToolContracts/UnityObjectIdentifier.csci/unity-projects/6000.5/Packages/manifest.json
Print the controlled Unity log tail before failing the strict 6000.5 package evidence assertion so direct-editor failures can be diagnosed from CI output.
The UNITY_LICENSE secret contains machine-bound DeveloperData, so direct .ulf placement fails on GitHub-hosted runners. Derive the personal serial inside the container, activate with the existing credentials, compile the fixture, and return the license on every exit.
The base image does not include the builder's BlankProject directory. Reuse the checked-in fixture for activation and license return so the direct 6000.5 container reaches the actual compilation command.
grep already prints a zero count when no diagnostics match; suppressing only its nonzero exit status keeps the count numeric and removes misleading integer-expression warnings from the 6000.5 check.
Use the image-local blank project for activation and license return so project compiler failures do not consume activation retries or hide the controlled fixture log.
Dismissing: the finding is factually incorrect. The parameterless Object.FindObjectsByType() overload exists since Unity 6000.4 (UnityCsReference Runtime/Export/Scripting/UnityEngineObject.bindings.cs), and the 6000.5 CI compile leg in this PR compiled this exact call with 0 errors / 0 warnings (run 29677617670).
Summary
User Impact
Changes
Verification
Packages/src..csvinput.Compile Check (2022.3.62f1)andCompile Check (6000.5.4f1)passed.gh pr checks 1840passed, including package tests, CLI build, security analysis, and complexity checks.actionlint: not run because it is not installed locally.