Skip to content

Commit 454ffd5

Browse files
author
Adam Schlesinger
committed
Fixed up READMEs
1 parent b88bd49 commit 454ffd5

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

OneSignalExample/Assets/OneSignal/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
</p>
44

55
# OneSignal Unity SDK
6-
A free push notification and in app messaging solution for mobile applications built through Unity.
6+
A free email, sms, push notification and in app messaging solution for mobile applications built through Unity.
77

88
[OneSignal](https://onesignal.com) provides a fully array of omni-channel messaging solutions across:
99

@@ -97,7 +97,7 @@ There are two methods of installation available for the OneSignal Unity SDK:
9797
### [Android](https://documentation.onesignal.com/docs/unity-sdk-setup#step-6---android-setup)
9898
9999
## Usage
100-
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
101101
[sample scene](Example/Scenes/OneSignalExampleScene.unity) which you can run to test out the SDK.
102102
103103
### Initialization

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ There are two methods of installation available for the OneSignal Unity SDK:
8383
and click **Save**.
8484
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
8585
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
8787
in order to finalize the installation.
8888
8989
> *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:
9797
### [Android](https://documentation.onesignal.com/docs/unity-sdk-setup#step-6---android-setup)
9898
9999
## Usage
100-
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.
102102
103103
### 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
104111
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.
105112
```C#
106113
// Replace 'YOUR_ONESIGNAL_APP_ID' with your OneSignal App ID from app.onesignal.com
107-
OneSignal.StartInit("YOUR_ONESIGNAL_APP_ID").EndInit();
114+
OneSignal.Default.Initialize("YOUR_ONESIGNAL_APP_ID");
108115
```
109-
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).
110118

111119
## API
112120
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

Comments
 (0)