Skip to content

Unity

Add the Hive SDK features you want to use as an external library. The Hive SDK provides various features such as authentication, payment, push notifications, and ad banners. Developers must select and install only the features they want to use. Here, we will guide you on how to use the most basic features: authentication and payment.

The Hive SDK is distributed with the External-Dependency-Manager for Unity (EDM4U) package included in the UnityPackage version. It is configured to automatically install/distribute the necessary libraries for the build with EDM4U settings. If the build environment where EDM4U can operate is not prepared, it must be set up. This can be done using the GUI provided by EDM4U or through the Unix shell, Bash, i.e., the Command Line Interface (CLI).

Notes for manual installation/update

Starting from Hive SDK v4 24.3.0, when installing or updating Hive SDK Unity via the Unity package instead of the Hive SDK Manager, you must delete all HIVESDK_{library_name}Dependencies.xml files located in the paths below before building the app.

  • Assets/Hive_SDK_v4/Dependencies
  • Assets/Hive_SDK_v4/Editor

The files to be deleted are as follows:

  • HIVESDK_DefaultDependencies.xml
  • HIVESDK_HerculesDependencies.xml
  • HIVESDK_HiveAnalyticsConsentModeDependencies.xml
  • HIVESDK_HiveDataStoreDependencies.xml
  • HIVESDK_HiveDeviceManagementDependencies.xml
  • HIVESDK_HiveGoogleInAppReviewDependencies.xml
  • HIVESDK_HiveGoogleInAppUpdateDependencies.xml
  • HIVESDK_HivePromotionDependencies.xml
  • HIVESDK_HiveRealNameVerificationDependencies.xml
  • HIVESDK_MarketAmazonDependencies.xml
  • HIVESDK_MarketAppleDependencies.xml
  • HIVESDK_MarketGoogleDependencies.xml
  • HIVESDK_MarketHiveStoreDependencies.xml
  • HIVESDK_MarketHuaweiDependencies.xml
  • HIVESDK_MarketLebiDependencies.xml
  • HIVESDK_MarketOneStoreDependencies.xml
  • HIVESDK_MarketSamsungDependencies.xml
  • HIVESDK_ProviderAdjustDependencies.xml
  • HIVESDK_ProviderAppleDependencies.xml
  • HIVESDK_ProviderAppleSignInDependencies.xml
  • HIVESDK_ProviderAppsFlyerDependencies.xml
  • HIVESDK_ProviderFacebookDependencies.xml
  • HIVESDK_ProviderFirebaseDependencies.xml
  • HIVESDK_ProviderGoogleDependencies.xml
  • HIVESDK_ProviderGooglePlayGamesDependencies.xml
  • HIVESDK_ProviderHiveMembershipDependencies.xml
  • HIVESDK_ProviderHuaweiDependencies.xml
  • HIVESDK_ProviderLineDependencies.xml
  • HIVESDK_ProviderQQDependencies.xml
  • HIVESDK_ProviderRecaptchaDependencies.xml
  • HIVESDK_ProviderSingularDependencies.xml
  • HIVESDK_ProviderVKDependencies.xml
  • HIVESDK_ProviderWechatDependencies.xml
  • HIVESDK_ProviderWeverseDependencies.xml
  • HIVESDK_PushAmazonAdmDependencies.xml
  • HIVESDK_PushGoogleFcmDependencies.xml

Android

This is the guide on how to install each product of the Hive SDK in Unity Android.

Android resolver settings

Run Unity and click on the Asset > External Dependency Manager > Android Resolver > Settings menu.


When the Android Resolver Settings window appears, check the items marked in red as the default settings.


Check the Copy and patch settingsTemplate.gradle from 2022.2 item only if you are using Unity version 2022.2 or later. The Use Jetifier feature is automatically supported by the Hive SDK, so it is recommended to deselect it.

If you select Use Jetifier in the latest version of Unity, you need to create a Custom Gradle Properties Template according to the Unity guide.

ExternalDependency settings

Click on the Hive > ExternalDependency menu.

When the settings window appears, select the Hive SDK features you want to use. For example, if you want to use Google authentication and Google Play Store payment features, select Google Signin in Auth Settings and Google PlayStore in Market Settings.

This guide explains how to install each Hive SDK product on Unity iOS.

Install CocoaPods

First, install CocoaPods. Run Unity and click the Asset > External Dependency Manager > iOS Resolver > Install CocoaPods menu.


You can also install it using the CLI (Bash-shell).

$sudo gem install cocoapods

If the result appears as below, the installation is complete.

iOS

iOS resolver settings

Next, configure CocoaPods. When providing external libraries for iOS using CocoaPods, the existing .xcodeproj file extension is changed to .xcworkspace. If you cannot proceed with the build in the .xcworkspace form, try changing the settings using the GUI. The method of applying CocoaPods performed in Unity on the build PC has changed and can be executed.

  1. Run Unity and click the Asset > External Dependency Manager > iOS Resolver > Settings menu.

  2. When the iOS Resolver Settings window appears, set the Cocoapods Integration item to .xcworkspace, and uncheck Link framework statically to avoid forcing the framework to be referenced statically.

ExternalDependency settings

Click the Hive > ExternalDependency menu.


When the settings window appears, select the Hive SDK features you want to use. For example, to use Google authentication and Apple AppStore payment features, select Google Signin in Auth Settings and Apple AppStore in Market Settings.

Windows

No additional settings are required after importing the Windows package.

Info

For detailed information on each Hive SDK feature (authentication, billing, notification, ...), refer to each feature guide.