Integrate Flurry SDK and plugin for Unity¶
Integrating with the Flurry SDK is easy and straightforward for Unity developers.
Prerequisites: The Flurry Unity plugin supports Android API level 16 and higher, and Xcode 8 and iOS 8 and higher.
Create an App & Get Your API Key¶
Start by creating an app. Once the app is created you’ll receive a Flurry API Key, which you’ll need when using the SDK.
An administrator role on your company’s account is needed to be able to create a new app within the company.
For each distinct app that is created you will acquire a unique Flurry API Key. For example, you’ll need two API keys are needed if you are going to release on both Android and iOS platforms.
Install Flurry SDK Unity Plugin¶
If it’s the first time you are using Unity, please visit Unity to download the Unity IDE.
Install unity plugin¶
The Flurry SDK Unity plugin is available via the Unity Asset Store and Github. The plugin now includes Flurry push, a free service for sending push notifications to your app users. For instructions on adding Push for Unity refer to Push for iOS Unity and Push for Android Unity.
Install Flurry SDK Unity plugin via the Unity Asset Store - by selecting Window -> Package Manager.
Install Flurry SDK Unity plugin via Github - by selecting Assets -> Import Package -> Custom Package and select the flurry-sdk-x.y.z.unitypackage.
The repo includes a sample script, FlurryStart.cs, in the Example folder.
Add the following calls to use the Flurry SDK in your project and initialize the Flurry SDK with your project’s API key:
In general, the Flurry session can be initialized in any of your game’s scripts, but we recommend starting the Flurry session as early as possible in your main program loop.
Now test run your app and ensure that it builds without errors. If everything is working properly, a session will be recorded in Flurry and should be visible on your Real Time dashboard within 30 seconds.
If you created the Flurry app within the last 5 minutes, the app may not yet be live on our servers and thus will not reflect real-time data. Re-run your app after 5 minutes to see your session recorded on the Real Time dashboard.
Congratulations! Your Unity app is now ready to be used with Flurry Analytics.