You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if [ "$FOUND" != "true" ]; then echo "✗ Android SDK version ${VERSION} not found after 5 attempts"; exit 1; fi
112
-
sed -i -E "s/const string Version = \"[0-9][0-9.]*\"/const string Version = \"$VERSION\"/" com.onesignal.unity.android/Editor/OneSignalAndroidDependencies.cs
112
+
sed -i -E "s/const string Version = \"[0-9][0-9.]*\"/const string Version = \"$VERSION\"/" com.onesignal.unitysdk.android/Editor/OneSignalAndroidDependencies.cs
113
113
sed -i -E "s/<androidPackage spec=\"com\.onesignal:OneSignal:[0-9][0-9.]*\"/<androidPackage spec=\"com.onesignal:OneSignal:$VERSION\"/" examples/demo/Assets/OneSignal/Editor/OneSignalAndroidDependencies.xml
114
114
sed -i -E "s/'com\.onesignal:OneSignal:[0-9][0-9.]*'/'com.onesignal:OneSignal:$VERSION'/" examples/demo/Assets/Plugins/Android/mainTemplate.gradle
115
115
sed -i -E "s/<package>com\.onesignal:OneSignal:[0-9][0-9.]*<\/package>/<package>com.onesignal:OneSignal:$VERSION<\/package>/" examples/demo/ProjectSettings/AndroidResolverDependencies.xml
@@ -133,7 +133,7 @@ jobs:
133
133
sleep 30
134
134
done
135
135
if [ "$FOUND" != "true" ]; then echo "✗ iOS SDK version ${VERSION} not found after 5 attempts"; exit 1; fi
136
-
sed -i -E "s/const string Version = \"[0-9][0-9.]*\"/const string Version = \"$VERSION\"/" com.onesignal.unity.ios/Editor/OneSignaliOSDependencies.cs
136
+
sed -i -E "s/const string Version = \"[0-9][0-9.]*\"/const string Version = \"$VERSION\"/" com.onesignal.unitysdk.ios/Editor/OneSignaliOSDependencies.cs
137
137
sed -i -E "s/version=\"[0-9][0-9.]*\"/version=\"$VERSION\"/" examples/demo/Assets/OneSignal/Editor/OneSignaliOSDependencies.xml
for asm in examples/demo/Assets/OneSignal/Editor/OneSignal.UnityPackage.Editor.asmdef examples/demo/Assets/OneSignal/Attribution/OneSignal.UnityPackage.Attribution.asmdef com.onesignal.unity.core/Samples~/OneSignal.UnityPackage.Example.asmdef; do
152
+
sed -i "s/public const string Version = \".*\"/public const string Version = \"${{ inputs.unity_version }}\"/" com.onesignal.unitysdk.core/Runtime/OneSignal.cs
for asm in examples/demo/Assets/OneSignal/Editor/OneSignal.UnityPackage.Editor.asmdef examples/demo/Assets/OneSignal/Attribution/OneSignal.UnityPackage.Attribution.asmdef com.onesignal.unitysdk.core/Samples~/OneSignal.UnityPackage.Example.asmdef; do
155
155
sed -i "s/\"expression\": \".*\"/\"expression\": \"${{ inputs.unity_version }}\"/" "$asm"
156
156
done
157
-
sed -i "s/\"com.onesignal.unity.core\": \"[0-9.]\+\"/\"com.onesignal.unity.core\": \"${{ inputs.unity_version }}\"/g" examples/demo/Packages/packages-lock.json
157
+
sed -i "s/\"com.onesignal.unitysdk.core\": \"[0-9.]\+\"/\"com.onesignal.unitysdk.core\": \"${{ inputs.unity_version }}\"/g" examples/demo/Packages/packages-lock.json
158
158
sed -i "s/bundleVersion: .*/bundleVersion: ${{ inputs.unity_version }}/" examples/demo/ProjectSettings/ProjectSettings.asset
159
-
sed -i "s/setSdkVersion:@\"[0-9]*\"/setSdkVersion:@\"${PADDED_VERSION}\"/" com.onesignal.unity.ios/Runtime/Plugins/iOS/UIApplication+OneSignalUnity.mm
159
+
sed -i "s/setSdkVersion:@\"[0-9]*\"/setSdkVersion:@\"${PADDED_VERSION}\"/" com.onesignal.unitysdk.ios/Runtime/Plugins/iOS/UIApplication+OneSignalUnity.mm
We also now include a prefab for codeless initialization!
162
162
163
-
Located in the `com.onesignal.unity.core` package we've include a simple prefab which initializes OneSignal. You can easily find it using the Asset search bar to find `OneSignalController.prefab` and making sure to select All** or **In Packages** for your search option. Drag the prefab into your very first scene, fill in the **App Id, and you are immediately ready to go!
163
+
Located in the `com.onesignal.unitysdk.core` package we've include a simple prefab which initializes OneSignal. You can easily find it using the Asset search bar to find `OneSignalController.prefab` and making sure to select All** or **In Packages** for your search option. Drag the prefab into your very first scene, fill in the **App Id, and you are immediately ready to go!
Copy file name to clipboardExpand all lines: README.md
+5-45Lines changed: 5 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,58 +62,18 @@ You must generate the appropriate credentials for the platform(s) you are releas
62
62
- Amazon Fire - [Generate an Amazon API Key](https://documentation.onesignal.com/docs/generate-an-amazon-api-key)
63
63
64
64
## Installation
65
-
There are two methods of installation available for the OneSignal Unity SDK:
66
65
> **Upgrading from 2.x.x to 3.x.x?**</br>
67
66
> Please check out our [v2 to v3 migration guide](MIGRATION_GUIDE_v2_to_v3.md).
68
67
69
68
> **Upgrading from 3.x.x to 5.x.x?**</br>
70
69
> Please check out our [v3 to v5 migration guide](MIGRATION_GUIDE_v3_to_v5.md).
71
70
72
-
<details>
73
-
<summary><b>Unity Asset Store</b> <i>(click to expand)</i></summary>
74
-
75
71
1. Add the OneSignal Unity SDK as an available asset to your account by clicking **Add to My Assets** from [our listing on the Unity Asset Store](https://assetstore.unity.com/packages/add-ons/services/billing/onesignal-sdk-193316).
76
72
2. Find the package waiting for you to download by clicking **Open in Unity** from that same page. This will open the Unity Editor and its Package Manager window.
77
-
3. On the SDK's listing in the Editor click the **Download** button. When it finishes click **Import**.
78
-
79
-

80
-
81
-
4. A prompt to import all of the files of the OneSignal Unity SDK will appear. Click **Import** to continue and compile the scripts into your project.
82
-
5. Navigate to **Window > OneSignal SDK Setup** (or follow the popup if upgrading) in the Unity Editor which will bring up a window with some final steps which need
83
-
to be completed in order to finalize the installation. The most important of these steps is **Import OneSignal packages**.
84
-
85
-
> *Depending on your project configuration and if you are upgrading from a previous version, some of these steps may already be marked as "completed"*
6. After importing the packages Unity will notify you that a new registry has been added and the **OneSignal SDK Setup** window will have refreshed with a few additional
90
-
steps. Following these will finalize your installation of the OneSignal Unity SDK.
91
-
</details>
92
-
93
-
<details>
94
-
<summary><b>Unity Package Manager</b> <i>(click to expand)</i></summary>
95
-
96
-
1. From within the Unity Editor navigate to **Edit > Project Settings** and then to the **Package Manager** settings tab.
3. Open the **Window > Package Manager** and switch to **My Registries** via the **Packages:** dropdown menu. You will see all of the OneSignal Unity SDK packages available
108
-
on which you can then click **Install** for the platforms you would like to include. Dependencies will be added automatically.
109
-
4. Once the packages have finished importing you will find a new menu under **Window > OneSignal SDK Setup**. Open it and you will find some final steps which need to be completed
110
-
in order to finalize the installation.
111
-
112
-
> *Depending on your project configuration and if you are upgrading from a previous version, some of these steps may already be marked as "completed"*
113
-
114
-

73
+
3. Install **OneSignal SDK Android** and/or **OneSignal SDK iOS** from the product. Unity installs **OneSignal SDK Core** automatically as a dependency.
74
+
4. Open **Window > OneSignal SDK Setup** and complete the remaining platform setup steps.
115
75
116
-
</details>
76
+
No scoped npm registry is required.
117
77
118
78
## Platform Configuration
119
79
### iOS
@@ -147,7 +107,7 @@ After building in Unity and exporting the XCode project follow these steps:
147
107
Most of the Android setup was already handled during installation!
148
108
149
109
The only thing remaining is to setup your own notification icons. You can do this be replacing the example icons located at `Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res`
150
-
with your own. There is a complete guide for this [in the plugin's README](com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/README.md). See our
110
+
with your own. There is a complete guide for this [in the plugin's README](com.onesignal.unitysdk.android/Editor/OneSignalConfig.androidlib/README.md). See our
151
111
[Customize Notification Icons](https://documentation.onesignal.com/docs/customize-notification-icons) page for additional details.
152
112
153
113
### Disable Location Module (Optional)
@@ -172,7 +132,7 @@ For a compact implementation of the major SDK features, open **Window > Package
172
132
173
133
### Initialization
174
134
#### Prefab
175
-
Located in the `com.onesignal.unity.core` package we've include a simple prefab which initializes OneSignal. You can easily find it using the Asset search bar
135
+
Located in the `com.onesignal.unitysdk.core` package we've include a simple prefab which initializes OneSignal. You can easily find it using the Asset search bar
176
136
to find `OneSignalController.prefab` and making sure to select **All** or **In Packages** for your search option. Drag the prefab into your very first scene, fill
177
137
in the **App Id**, and you are immediately ready to go!
0 commit comments