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
You can find a complete implementation in our included [example MonoBehaviour](Example/Scripts/OneSignalExampleBehaviour.cs). Additionally we have included a
100
+
You can find a complete implementation in our included [example MonoBehaviour](Example/OneSignalExampleBehaviour.cs). Additionally we have included a
101
101
[sample scene](Example/Scenes/OneSignalExampleScene.unity) which you can run to test out the SDK.
Copy file name to clipboardExpand all lines: README.md
+13-5Lines changed: 13 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,7 @@ There are two methods of installation available for the OneSignal Unity SDK:
83
83
and click **Save**.
84
84
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
85
85
on which you can then click **Install** for the platforms you would like to include. Dependencies will be added automatically.
86
-
4. Once the packages have finished importing you will find a new menu under **Window > OneSignal**. Open it and you will find some final steps which need to be completed
86
+
4. Once the packages have finished importing you will find a new menu under **Window > OneSignal**. Open it and you will find some final steps which need to be completed
87
87
in order to finalize the installation.
88
88
89
89
> *Depending on your project configuration and if you are upgrading from a previous version, some of these steps may already be marked as "completed"*
@@ -97,16 +97,24 @@ There are two methods of installation available for the OneSignal Unity SDK:
You can find a complete implementation in our included [example MonoBehaviour](OneSignalExample/Assets/OneSignal/Example/Scripts/OneSignalExampleBehaviour.cs). Additionally we have included a
101
-
[sample scene](OneSignalExample/Assets/OneSignal/Example/Scenes/OneSignalExampleScene.unity) which you can run to test out the SDK.
100
+
You can find a complete implementation in our included [example MonoBehaviour](Example/OneSignalExampleBehaviour.cs). Additionally we have included a
101
+
[sample scene](Example/Scenes/OneSignalExampleScene.unity) which you can run to test out the SDK.
102
102
103
103
### Initialization
104
+
105
+
#### Prefab
106
+
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
107
+
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
108
+
in the **App Id**, and you are immediately ready to go!
109
+
110
+
#### Code
104
111
To get started add the following code in an appropriate place such as the `Start` method of a `MonoBehaviour` early in your application's lifecycle.
105
112
```C#
106
113
// Replace 'YOUR_ONESIGNAL_APP_ID' with your OneSignal App ID from app.onesignal.com
You are now ready to start sending and receiving messages. For additional information please see [our complete OneSignal Unity SDK docs](https://documentation.onesignal.com/docs/unity-sdk-setup).
116
+
117
+
You are now ready to start sending and receiving notifications and in-app messages. For additional information please see [our complete OneSignal Unity SDK docs](https://documentation.onesignal.com/docs/unity-sdk-setup).
110
118
111
119
## API
112
120
See OneSignal's [OneSignal Unity SDK API](https://documentation.onesignal.com/docs/unity-sdk) page for a list of all available methods.
0 commit comments