Skip to content

Support Unity 2022.3 across SDK and demo#886

Open
fadi-george wants to merge 4 commits into
mainfrom
fg/unity-2022-support
Open

Support Unity 2022.3 across SDK and demo#886
fadi-george wants to merge 4 commits into
mainfrom
fg/unity-2022-support

Conversation

@fadi-george

Copy link
Copy Markdown
Collaborator

Description

One Line Summary

Restore Unity 2022.3 as the minimum supported version and let the demo open and build cleanly across Unity 2022.3 and Unity 6.

Details

Motivation

The demo project and SDK editor tooling had drifted to require Unity 6-only APIs and modules (UnityEngine.Accessibility, TextField.textEdition.placeholder), which broke opening/building the project on Unity 2022.3. This PR lowers the documented minimum back to Unity 2022.3 and guards the version-specific code so the same project works on both Unity 2022.3 and Unity 6.

Scope

  • Docs / requirements: Bump the minimum Unity version from 2021.3 to 2022.3 in README.md and the demo README.md files.
  • Editor dependency generation: OneSignalAndroidDependencies and OneSignaliOSDependencies now skip initialization inside the asset import worker process (AssetDatabase.IsAssetImportWorkerProcess()), avoiding redundant/erroneous dependency writes during imports on newer Unity.
  • File inventory: OneSignalFileInventory.GetCurrentPaths() excludes the generated Android/iOS dependency XML (and .meta) files so generated artifacts aren't tracked as package assets.
  • Demo UI compatibility: Placeholder text is now set through a SetPlaceholder helper guarded by UNITY_2023_1_OR_NEWER, since TextField.textEdition.placeholder does not exist on Unity 2022.3. Updated across DialogBase, MultiPairInputDialog, OutcomeDialog, and TrackEventDialog.
  • Accessibility: AccessibilityBridge is compiled only under UNITY_2023_2_OR_NEWER && ONESIGNAL_E2E_ACCESSIBILITY, with no-op fallbacks otherwise, because UnityEngine.Accessibility is not available on Unity 2022.3. The com.unity.modules.accessibility module is removed from the demo manifest.json/packages-lock.json and instead injected only during E2E via the workflow.
  • CI: The E2E workflow enables the accessibility module and ONESIGNAL_E2E_ACCESSIBILITY define at build time, pins unityVersion to 6000.4.11f1, and includes Assets/csc.rsp in the Library cache keys.

Testing

Manual testing

The demo can now be opened directly in both Unity 2022.3 and Unity 6. The E2E workflow enables Unity 6's Accessibility module only for automated builds because that module is not available in Unity 2022.3.

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
  • I have reviewed this PR myself, ensuring it meets each checklist item
Open in Web Open in Cursor 

fadi-george and others added 4 commits July 9, 2026 18:46
Guard APIs unavailable in Unity 2022 and provide a launcher that temporarily disables the newer accessibility module while preserving Unity 6 E2E behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the accessibility module CI-only so Unity 2022 and Unity 6 can both resolve the committed project without swapping manifests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@fadi-george fadi-george marked this pull request as ready for review July 10, 2026 17:10
@fadi-george fadi-george requested a review from a team as a code owner July 10, 2026 17:10
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