Skip to content

Unreal

This guide provides instructions for setting up the Hive SDK marketing attribution feature in Unreal Engine.

Unreal Editor settings

In the Unreal environment, you can automatically create the hive_config.xml file and assign configuration values using the Unreal Editor. When the user changes the configuration values, they are automatically saved in the Unreal Editor, and the files that store the configuration values (hive_config.xml, etc_string.xml, GooglePlayAppID.xml) are also automatically saved to reflect the changes.

If the configuration file is not present, the Hive SDK will be created automatically, and the path to that file is as follows.:


  • Android: ;/Plugins/HIVESDK/Source/HIVESDK/ThirdParty/android/resource/res/raw
  • iOS: ;/Plugins/HIVESDK/Source/HIVESDK/ThirdParty/iOS/resource/
  • Windows: ;/Plugins/HIVESDK/Source/HIVESDK/ThirdParty/Windows/config/hive_config.xml


The method to configure the hive_config.xml file for using Hive in Unreal Editor is as follows.

  1. To configure the hive_config.xml file, first click on Edit > Project Settings in the Unreal Editor menu. The project settings window will appear on the screen.

  2. Click the Hive Config menu in the left panel of the project settings window. The HIVEConfig XML settings screen will appear.

In the HIVEConfig XML screen, enter the configuration values for the marketing attribution in the Provider > Attributes field. Enter the AppID, key, or token value issued from the marketing attribution dashboard you will use.

Add Marketing Attribution

  1. Click Edit > Project Settings in the Unreal Editor menu. The Project Settings window will appear.
  2. In the left panel of the Project Settings window, click on Dependency – Android / Dependency – iOS under Hive SDK.

  3. Select only the attributions you want to use in Analytics.

Attribution-specific settings

Additional settings are required according to the attribution.

Resolving Singular library conflicts

This is the configuration to use Singular attribution. To properly use the external libraries included in the Hive SDK, the following code modifications are necessary.

  1. Go to /Engine/Build/Android/Java/src/com/android/vending/licensing.
  2. Delete the following files.
    • ILicensingService.aidl
    • ILicenseResultListener.aidl

Resolving AppsFlyer library conflicts

This is the setup for using AppsFlyer attribution.

To properly use the external library of AppsFlyer included in the Hive SDK, the following project settings are required.
Please add the code below to Project Settings > Platforms > Android > Advanced APK Packaging > Extra Tags for application node as shown in the example image.

   tools:replace="android:allowBackup"
   android:allowBackup="false"

/// caption Example image ///

Note
  • When using Unreal Engine 4, add the code below to Project Settings > Platforms > Android > Advanced APK Packaging > Extra Tags for node as shown in the example image.

xmlns:tools="http://schemas.android.com/tools"

Add required Firebase files

When using Firebase, you need to download the required files from the Firebase Console and add them to your development project.

Android

After registering the app in the Firebase console, download the google-services.json file here. Then, specify the path where you downloaded the file in the FirebaseAnalytics File(google-services.json) Path.

iOS

This is the setup for using Firebase Analytics attribution. Please register your app in the Firebase console and place the issued GoogleService-Info.plist file in /Plugins/HIVESDK/Source/HIVESDK/ThirdParty/iOS/resource.