Push.Express Documentation
  • Push.Express Documentation
  • Quckstart
    • How to use
    • Analytics
    • Demo apps
  • SDK
    • PWA
    • Kotlin
    • Swift
    • Unity
    • Flutter
    • Onesignal
  • API
    • Applications
    • App Instances (Devices)
    • Pushes
    • One-time sending in future
    • Smart weekly sending
    • Instant sending
  • SDK API
    • SDK API specs
Powered by GitBook
On this page
  • PushExpress -- SDK Unity
  • Setup Firebase
  • Setup Push.Express
  • Add sdk in your application
  1. SDK

Unity

PreviousSwiftNextFlutter

Last updated 28 days ago

PushExpress -- SDK Unity

You will need to integrate your Push.Express account with Firebase.

  1. Follow

Setup Firebase

  1. Go to and create a new project (or use existing one)

    You can use one project for all your apps.

  2. Open Project Settings -> General

  3. Create new Unity app or just download google-services.json from existing app

If you need to create new app, just:

  • Register it

  • Download google-services.json

  • Press next-next-next =)

  1. Put google-services.json to your Assets dir (like Assets/google-services.json)

Setup Push.Express

Get Firebase Private key

  1. You can use one project for all your apps.

  2. Open Project Settings

  3. Go to Service accounts, press Generate new private key and save it to file private-key.json (you can use same key for all apps)

Integrate your Push.Express App with Firebase

  1. Open existing App settings or create a new App

  2. Switch type application Android

  3. Paste private-key.json file to Firebase Admin SDK private key textbox

Add sdk in your application

  1. Import the main resources TextMeshPro. To do this, go to Window > TextMeshPro > Import TMP Essential Resources > Press All > Press Import.

  2. Add package Newton json. To do this, go to Window > Package Manager > In the upper-left corner, click on the + > Install package by name... > Enter in input com.unity.nuget.newtonsoft-json > Press instal.

  3. Add Push Express Prefab на сцену. Open Unity > Open the Project window > Go to Assets > PushExpress > Drag the Prefab from the Project window to the Hierarchy or Scene window > Prefab will appear on the stage and you can adjust its settings.

  4. Add permissions to AndroidManifest if your app is for Android. To do this, go to Assets > Plugins > Android > AndroidManifest.xml > add the code inside the application section

   <uses-permission android:name="android.permission.INTERNET" />
   <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
   <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

Add android:theme="@style/Theme.AppCompat.Light.NoActionBar" in the activity tag

   <activity android:name="com.google.firebase.MessagingUnityPlayerActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@style/Theme.AppCompat.Light.NoActionBar">

Go to and create a new project (or use existing one)

Go to your account

Add SDK Firebase Messaging. To do this, go to the official download page > Download the latest SDK version (as .zip archive) > Unzip the downloaded archive to a convenient location on your computer > Inside the archive you will find several .unitypackage of files for various Firebase modules. Open Unity > Assets > Import Package > Custom Package > Select a file FirebaseMessaging.unitypackage > In the import window, select all files and press Import

Add SDK Push Express. To do this, go to the GitHub page > Download SDK version (as .zip archive) > Unzip the downloaded archive to a convenient location on your computer. Open Unity > Assets > Import Package > Custom Package > Select a file PushExpressSdkV1.3.unitypackage > In the import window, select all files and press Import

Configure the Push Express Prefab settings. To do this, double-click on it in the Project window > Prefab Mode opens > In the Inspector window, set the parameters of your application. Paste the PUSH EXPRESS_APP_ID value of your application into the App Id Prefab field (the value of PUSH EXPRESS_APP_ID can be found in the section of the personal account). Set the Platform and Platform Name parameters according to the type of your application.

Firebase Console
Push.Express
Firebase Unity SDK
Push Express Unity SDK
Applications
Firebase Console
Firebase Cloud Messaging integration guide
Create application in Push.Express
Add sdk in your application