Unity
There are two ways to configure hive_config.xml in the Unity environment.
- Automatically configure the contents of hive_config.xml with Unity Config Editor
- Manually configure hive_config.xml
1. Automatic configuration with Unity Config Editor¶
In the Unity environment, you can automatically create the hive_config.xml file and configure most of its contents using the Unity Config Editor. However, even when using the Unity Config Editor, some values in the hive_config.xml file must be set manually.
Note
When developing Android apps, it is convenient not to have to configure AndroidManifest.xml directly, so using the Unity Config Editor is recommended.
Running Unity Config Editor¶
Select Hive > Hive Config (Edit Config) and set the necessary values on the Editor screen.
Select execution environment¶
First, select the app execution environment (Android, iOS, macOS, Windows).
Common (common SDK features)¶
Common tab allows you to configure settings that apply to all SDK features. You can set the AppID and choose the server (production or sandbox). You can also determine the screen orientation to be displayed when the app is launched. All settings in the Common tab are required to be filled out.
| Field | Description | Value Range |
|---|---|---|
| Hive App Id | AppID registered in the Console App Center | (e.g., com.sample.your) |
| Zone | Hive server | * Sandbox * Real |
| Logging | Whether to enable logging of internal operations of the SDK | * On * Off |
| AgeGateU13 | Whether to apply COPPA ageGateU13 | * Off * On |
| Hive Orientation | UI of the SDK displayed according to device orientation settings | * All * Portrait * Landscape * Undefined |
| Channel | Login and in-app support service platform used in the game app | * C2S (Hive Platform) * KAK (Kakao) * LIN (Line) * STE (Steam) * EPI (Epic Store) * FAS (FastSprint) |
| Market | Market for in-app purchase (for Analytics collection) | * GO (Google Play Store) * AP (Apple App Store) * ON (ONE Store) * AM (Amazon Appstore) * LE (Com2uS Lebi) * HS (Hive Store) * GA (Samsung Galaxy Store) * HU (Huawei AppGallery) |
| Universal Link | Universal Link for iOS Deferred Deep Link settings | Domain specified by the app developer (e.g., https://yourdomain.com) |
Auth (authentication)¶
Auth tab is where you configure settings to use the SDK Authentication feature. The SDK supports IdP logins such as Facebook, Google, and QQ. After selecting the IdP to be used for login, you need to retrieve and enter the AppId, ClientId, etc., from the developer console of this IdP (for example: Google console).
For example, to use Google Sign-In, you need to obtain the required values for the Google Sign-In item from the Google console and enter them in the Auth tab as shown below.
- Google App Id: Enter the AppID issued from the Google console
- Google Server Client ID: Enter the Client ID value of the web application issued from the Google console
Note
For detailed information on each Authentication IdP configuration value, please refer to the Authentication Preparation Page.
Market (billing)¶
Market tab is where you configure the settings to use the SDK Billing feature. The SDK supports app markets such as Google Play Store and Apple App Store, and in this tab, you need to set the values required for in-app purchases.
For example, if the app supports the Android Lebi market and WeChat Pay, you need to enter the Payment Key issued from the WeChat console in the market tab.
| Field | Description | Value Range |
|---|---|---|
| WeChat Payment Key | When using WeChat as a charging method for Lebi market on Android Set the Payment Key for WeChat | (Example: abcDEF1234xYz789) |
Analytics (marketing attribution)¶
Analytics tab is where you configure the settings to use the SDK Marketing Attribution feature. The SDK supports marketing attribution through Adjust, Firebase, etc., and you need to obtain the key and event values from the respective service developer console and enter them in this tab.
For example, to use Adjust, enter the required values for the Adjust item in the Analytics tab according to the information below.
- appToken: Enter the AppToken issued from the Adjust console
- Event: Enter the Name and Value of the event registered in the Adjust console
Note
For more details on each Marketing Attribution setting, please refer to the Marketing Attribution Preparation Page.
Optional (network communication options, logging, and other features)¶
Optional In the tab, you can enter network communication options, logs, and other settings when using the SDK.
For example, if you want to extend the network timeout when calling an SDK method, increase the values of httpConnectTimeout and httpReadTimeout. As another example, when sending remote logs, you can change the transmission cycle and the size of the transmitted log data, which allows you to modify the Analytics log setting values. It is recommended to use the default values for optional tab items unless absolutely necessary.
| Field | Description | Value Range |
|---|---|---|
| Unsupported UA Share Type | Type of social media to be used in the sharing UI when using Android UA Share feature | * SMS * URL * KAKAO * LINE * MESSENGER |
| agreementDetermineBase | Criteria for determining agreement to terms | * device * account |
| httpConnectTimeout | Set the Connect timeout duration (in seconds) during Hive protocol communication (default value recommended) | * 8 (default) |
| httpReadTimeout | Set the Read timeout duration (in seconds) during Hive protocol communication (default value recommended) | * 8 (default) |
| maxGameLogSize | Maximum number of game logs stored as unstructured data files | |
| analyticsSendLimit | Maximum amount of logs to send per Analytics log transmission cycle | |
| analyticsQueueLimit | Maximum amount of Analytics logs that can be queued | |
| analyticsSendCycle | Analytics log transmission cycle | |
| saveAnalytisLogBeforeCrash | iOS-specific setting to determine whether to save pending Analytics logs to a file instead of sending them to the server when the app is about to crash due to a NSException type error or Unix signal type error |
Save settings and create hive_config.xml file¶
After completing all tab settings in the Unity Config Editor, clicking Save & Regenerate setting files will automatically generate the hive_config.xml file.
Android¶
Clicking on Save & Regenerate setting files will create the AndroidManifest.xml file and the hive_config.xml file. The location where the hive_config.xml file is created varies depending on the version of Unity.
- Unity 2021 and above:
/Assets/HiveSDK/hive.androidlib/src/main/res/raw/hive_config.xml - Unity below 2021:
/Assets/Plugins/Android/res/raw/hive_config.xml
iOS¶
Clicking Save & Regenerate setting files will create the Info.plist file and the hive_config.xml file. The hive_config.xml file will be created at the location below.
/Assets/Plugins/iOS/hive_config.xml
Windows¶
Pressing the Windows button will create the hive_config.xml file. The hive_config.xml file will be created in the location below.
/Assets/Plugins/Windows/res/hive_config.xml
2. Manual configuration¶
If you do not use the Unity Config Editor, you will need to create the hive_config.xml file and manually set most of the values in the file.
hive_config.xml file creation¶
Create the hive_config.xml file directly at the path below.
- Android
- Unity 2021 or later:
/Assets/HiveSDK/hive.androidlib/src/main/res/raw/hive_config.xml - Unity prior to 2021:
/Assets/Plugins/Android/res/raw/hive_config.xml
- Unity 2021 or later:
- iOS
/Assets/Plugins/iOS/hive_config.xml
- Windows
/Assets/Plugins/Windows/res/hive_config.xml
hive_config.xml modification¶
Refer to Next to directly modify and save the hive_config.xml file. However, some values in the file are set according to the needs of the developer.
hive_config.xml file example¶
Below is an example of the hive_config.xml file when using Authentication (Google Authentication) and Billing (Google Play Store or Apple App Store). Please modify, add, or delete values according to the SDK features you want to use and the app environment. Since iOS only supports Apple App Store Billing, set the market to AP in the Unity iOS environment.
<properties>
<!-- SDK common settings: START -->
<!-- Set game build unique identifier -->
<appId>com.sample.your</appId>
<!-- Select server for Hive Platform. sandbox is for development, real is for commercial
(sandbox, real) -->
<zone>real</zone>
<!-- Set whether to use SDK internal operation logs
(true, false) -->
<useLog>false</useLog>
<!-- Set whether to apply ageGateU13
(true, false) -->
<ageGateU13>false</ageGateU13>
<!-- Hive Orientation setting -->
<hiveOrientation>landscape</hiveOrientation>
<!-- Channel setting (login and in-app support service platform)
(C2S: Hive Platform) -->
<channel>C2S</channel>
<!-- Billing market setting (GO: Google Play, LE: Com2uS Lebi, AP: Apple App Store) -->
<market>GO</market>
<!-- Set standard for receiving terms agreement
(device, account) -->
<agreementDetermineBase>false</agreementDetermineBase>
<!-- Terms exposure design setting (Not set for SDK v4)
(true, false) -->
<!-- <authV1Agreement>device</authV1Agreement> -->
<!-- Set sharing apps to not expose when sharing promotion UA (Android Only) -->
<unsupportedUAShareType>
<value>SMS</value>
<value>URL</value>
</unsupportedUAShareType>
<!-- Set HTTP Connect Timeout time in seconds used internally by the SDK
(Do not change unless it is a special case) -->
<httpConnectTimeout>8</httpConnectTimeout>
<!-- Set HTTP Read Timeout time in seconds used internally by the SDK
(Do not change unless it is a special case) -->
<httpReadTimeout>8</httpReadTimeout>
<!-- SDK common settings: END -->
<!-- SDK Analytics settings: START -->
<!-- Analytics settings, refer to the Analytics pre-configuration guide -->
<!-- SDK Analytics settings: END -->
<!-- SDK feature settings: START -->
<providers>
<!-- Set Authentication product, refer to the Authentication pre-configuration guide -->
<!-- Set Billing product, refer to the Billing pre-configuration guide -->
<!-- Set Marketing Attribution product, refer to the Marketing Attribution pre-configuration guide -->
</providers>
<!-- SDK feature settings: END -->
</properties>
Info
The SDK configuration can save values in the configuration file before app build or change the settings during runtime (app execution). For more details, please check SDK configuration.





