Unity
Integration Guide
The OpenBack Unity plugin provides the API interface to the native OpenBack Android and iOS SDKs, as well as an editor to simplify configuration. We recommend using the External Dependency Manager for Unity to import the SDKs and their dependencies. It provides a simple way to get the OpenBack SDKs from our maven repository and Cocoapods.
The plugin source code is available on GitHub as part of the Sample app.
note
The OpenBack Unity SDK is built using Unity version 2019.4.16f1.
Import OpenBack Unity plugin
Download one of the 2 packages:
- OpenBackWithResolver.unitypackage: OpenBack Unity plugin + External Dependency Manager for Unity.
- OpenBack.unitypackage: OpenBack Unity plugin only.
Then to import the package, simply double click the package with your Unity project open or use the menu Assets > Import Package > Custom Package....
note
- The current OpenBack dependencies are listed in OpenBackDependencies.xml.
- The version of the packaged External Dependency Manager for Unity is v1.2.162.
If you do not want to use External Dependency Manager for Unity, use the OpenBack package only. You will need to follow the native integration guides for Android and iOS. Configuration can still be done from the Unity editor window.
Configure OpenBack
After importing the OpenBack Unity package, open the configuration window from the menu Window > OpenBack > Settings


iOS Configuration
For more detailed information on advanced settings, check the the full iOS documentation.
Editor Settings
Setting | Overview |
---|---|
App Code | The OpenBack app code for your application |
App Group | The app group used for OpenBack and app extenstions |
Log Level | The debug log level (None to Verbose) |
Clear Badge Count | Controls if OpenBack clears the badge number when app is opened (only if badge is enabled) |
LargeIcon | Default large icon for notification (filename in main bundle or image asset name) |
Sound | Set the default notification sound (filename in main bundle) |
Auto Start | Controls if OpenBack starts automatically. |
Enable Core Motion | Controls if library can use Core Motion Activity manager. |
Enable Microphone | Controls if OpenBack can use the microphone. |
Enable Proximity | Controls if OpenBack can use the proximity sensor. |
Use Swizzling | Controls if swizzling is enabled. If you disable swizzling, you must hook some delegate calls to OpenBack manually (see docs). |
Enabling Push Notifications
Open the Xcode workspace generated by the build and enable push notifications in the project capabilities. See the Setup APNs Certificates for Push Notifications guide for more info.

Optional Frameworks
If you are planning to use location, core motion or bluetooth signals, you need to add the OpenBack optional modules to your dependencies in the Cocoapod section of OpenBack/Editor/OpenBackDependencies.xml. Check the iOS Signals docs for more info.
Android Configuration
For more detailed information on advanced settings, check the the full Android documentation.
Editor Settings
Setting | Overview |
---|---|
App Code | The OpenBack app code for your application |
Log Level | The debug log level (None to Verbose) |
Icon | The resource ID for the notification icon (e.g. @drawable/xxx). |
Color Accent | The resource ID for the notification color accent (e.g. @color/xxx). |
Large Icon | The resource ID for the notification large icon (e.g. @drawable/xxx). |
Sound | The resource ID for the notification sound in res/raw (e.g. @raw/xxx). |
Channel | The string name of the default notification channel (e.g. @string/xxx or direct value). |
Channel Description | The string description of the default notification channel (e.g. @string/xxx or direct value) |
Auto Start | Controls if OpenBack starts automatically. |
Adding Resources
Go to your project Assets > Plugins > Android > OpenBackUnity and add a res folder with the assets.

Example
To set the notification icon used by OpenBack, generate the icon image files (from Android Studio or Android Asset Studio) and place the result in res folder. Then set the Icon field in the editor to the resource name @drawable/ic_notification_icon.
Firebase Setup
Add the OpenBack Firebase service handlers in your Android manifest. See Setting Up Firebase for more details.
When using the resolver, the Firebase dependency is already included in OpenBack/Editor/OpenBackDependencies.xml. You need to copy the google-services.json
file from your Firebase console. See Setting Up Firebase for more details.
You also have the option to use the Firebase SDK for Unity directly. Download the Firebase SDK and import FirebaseMessaging.unitypackage in your project. Follow the Setup for Android steps.
note
Using FCM with OpenBack is recommended but not required. If you do not want to use FCM, just comment out the dependency in OpenBack/Editor/OpenBackDependencies.xml.
Location Services
If you plan on using location triggers, uncomment the section in the OpenBack dependencies OpenBack/Editor/OpenBackDependencies.xml then run the resolver again.
API Documentation
These endpoints are used for your app to interact directly with OpenBack.
The API is defined in the OpenBackUnity
namespace and is accessed using the OpenBack.SharedInstance
object of the OpenBack
class.
Check the SampleApp for some sample usage.