fix: support Unity 2022.2 object lookup compatibility#1089
fix: support Unity 2022.2 object lookup compatibility#1089chenkunqing wants to merge 1 commit intoCoplayDev:betafrom
Conversation
📝 WalkthroughWalkthroughThe compatibility wrapper for Unity object finding is updated to use newer Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
Description
Fix a Unity 2022.2 compatibility issue in
UnityFindObjectsCompat.Some Unity 2022.2 editor versions do not reliably expose the newer object lookup APIs used by the package. This caused compilation failures in projects using Unity 2022.2.1f1.
Type of Change
Changes Made
Object.FindObjectsByType(...)untilUNITY_2022_3_OR_NEWERObject.FindAnyObjectByType(...)untilUNITY_2022_3_OR_NEWERFindObjectsOfType(...)/FindObjectOfType(...)as the fallback path for Unity 2022.2.xTesting/Screenshots/Recordings
2022.2.1f12022.2.1f1after the compatibility changegit diff --checkDocumentation Updates
tools/UPDATE_DOCS_PROMPT.md(recommended)tools/UPDATE_DOCS.mdRelated Issues
Relates to Unity 2022.2.x compilation failures in
UnityFindObjectsCompat.Additional Notes
This change intentionally keeps the fix minimal and only adjusts the version gating for object lookup APIs in the compatibility helper.
Summary by CodeRabbit