Support Unity 2022.3 across SDK and demo#886
Open
fadi-george wants to merge 4 commits into
Open
Conversation
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>
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.
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
README.mdand the demoREADME.mdfiles.OneSignalAndroidDependenciesandOneSignaliOSDependenciesnow skip initialization inside the asset import worker process (AssetDatabase.IsAssetImportWorkerProcess()), avoiding redundant/erroneous dependency writes during imports on newer Unity.OneSignalFileInventory.GetCurrentPaths()excludes the generated Android/iOS dependency XML (and.meta) files so generated artifacts aren't tracked as package assets.SetPlaceholderhelper guarded byUNITY_2023_1_OR_NEWER, sinceTextField.textEdition.placeholderdoes not exist on Unity 2022.3. Updated acrossDialogBase,MultiPairInputDialog,OutcomeDialog, andTrackEventDialog.AccessibilityBridgeis compiled only underUNITY_2023_2_OR_NEWER && ONESIGNAL_E2E_ACCESSIBILITY, with no-op fallbacks otherwise, becauseUnityEngine.Accessibilityis not available on Unity 2022.3. Thecom.unity.modules.accessibilitymodule is removed from the demomanifest.json/packages-lock.jsonand instead injected only during E2E via the workflow.ONESIGNAL_E2E_ACCESSIBILITYdefine at build time, pinsunityVersionto6000.4.11f1, and includesAssets/csc.rspin 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
Checklist
Overview
Testing
Final pass