Unity
hive_config.xml file is created and the items within the file are configured. There are two ways to create and configure the hive_config.xml file in Hive SDK Unity.
- Automatic file generation and configuration using Unity Hive Config Editor
- Manually create and configure files
Unity hive config editor settings¶
In the Unity environment, you can automatically create the hive_config.xml file and assign configuration values using the Unity Hive Config Editor.
Setting OS and authentication version¶
Select Hive > Hive Config (Edit Config) and set the necessary values on the Editor screen. First, check the OS and Hive App Id. Then, to use Google authentication, select OS and set the values in the Google SignIn item under the Auth menu.
Google sign-in settings¶
To use regular Google authentication, enter the required values for the Google SignIn item in the Auth menu according to the information below.
- Enter the AppID you received in the Google App Id field.
- Enter the Client ID value of the web application you received in the Google Server Client ID field.
HiveConfig settings¶
You can set the following values among the values configured in the hive_config.xml file.
<
Item | OS | Description | Required | SDK Default |
---|---|---|---|---|
appId | Android, iOS, Windows | Game build identifier. | X |
|
zone | Android, iOS, Windows | The server that the Hive client will connect to.
| X | `real` |
useLog | Android, iOS, Windows | Whether to enable logging of internal operations of the Hive client. When logging is enabled, logs will be output to the development tool screen.
| X | `false` |
ageGateU13 | Android, iOS, Windows | COPPA ageGateU13 application status. To apply COPPA ageGateU13 to the Hive SDK, you must register the COPPA terms in the Hive console and set this value to true before initializing the Hive SDK. If you do not wish to apply COPPA ageGateU13, you must register terms other than COPPA in the Hive console and set this value to false before initializing the Hive SDK.
| X | `false` |
hiveOrientation | Android, iOS, Windows | The UI of the Hive SDK will be displayed according to the device orientation settings.
| X | 'undefined' |
channel | Android, iOS, Windows | The platform for login and in-app support services used in the game app. If you log in to external social media or use in-app purchases through the Hive SDK, it corresponds to C2S. Used for collecting analytics data from the Hive SDK.
| O | `C2S` |
market | Android, iOS, Windows | This is the market for processing in-app purchases. It is used for Hive SDK analytics collection.
| O | Blank value |
agreementDetermineBase | Android, iOS | Determines the criteria for obtaining agreement to the terms. You can choose either `device` or `account`, with the default being `device`.
| X | `device` |
unsupportedUAShareType | Android | This is an Android-specific setting that configures which sharing apps will not display an icon when using the promotional user acquisition (UA) sharing feature. The configured targets will not have their icons displayed in the UI.
| X | Blank value |
httpConnectTimeout | Android, iOS, Windows | This is the timeout duration (in seconds) for HTTP Connect used internally by the Hive client.
| X | `8` (unit: seconds) |
httpReadTimeout | Android, iOS, Windows | This is the timeout duration (in seconds) for HTTP Read used internally by the Hive client.
| X | `8` (unit: seconds) |
hive_config.xml file creation¶
Inspector After completing the settings, follow the steps below to create the hive_config.xml file.
- Android: Click the Save & Regenerate setting files button to generate the AndroidManifest.xml file and the hive_config.xml file. The hive_config.xml file will be created in the following directory.
- Unity 2021 and above:
/Assets/HiveSDK/hive.androidlib/src/main/res/raw - Unity below 2021:
/Assets/Plugins/Android/res/raw/
- Unity 2021 and above:
- iOS: Click the Save & Regenerate setting files button to generate the Info.plist file and the hive_config.xml file. The hive_config.xml file will be created in the following directory.
/Assets/Plugins/iOS/<
hive_config.xml example¶
Below is an example of the hive_config.xml file when using authentication (Google authentication) and payment (Google Play Store or Apple AppStore). Please modify, add, or delete values according to the Hive SDK features and app environment you wish to use. Since iOS only supports Apple AppStore payments, set the market to AP
in the Unity iOS environment.
<properties>
<!-- Hive SDK Common Settings: START -->
<!-- Set unique game build identifier -->
<appId>com.sample.your</appId>
<!-- Select Hive platform server. sandbox for development, real for production
(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>
<!-- Payment market setting
(GO: Google Play, LE: Com2us Lebi, AP: Apple App Store) -->
<market>GO</market>
<!-- Set criteria for receiving agreement to terms
(device, account) -->
<agreementDetermineBase>false</agreementDetermineBase>
<!-- Set HTTP Connect Timeout used internally by Hive SDK in seconds
(Do not change unless in special cases) -->
<httpConnectTimeout>8</httpConnectTimeout>
<!-- Set HTTP Read Timeout used internally by Hive SDK in seconds
(Do not change unless in special cases) -->
<httpReadTimeout>8</httpReadTimeout>
<!-- Hive SDK Common Settings: END -->
<!-- Hive SDK Feature Settings: START -->
<!-- Authentication feature setting: Use Google authentication -->
<providers>
<google playAppId="123456789012" clientId="123456789012-abc.apps.googleusercontent.com" serverClientId="123456789012-abc.apps.googleusercontent.com" reversedClientId="com.googleusercontent.apps.123456789012-abc" deviceFlowClientId="331526026701-gn1abq1ev23nqj7rdvvlaamf7ii4f3u9.apps.googleusercontent.com" />
</providers>
<!-- Hive SDK Feature Settings: END -->
</properties>
Info
The Hive SDK configuration can store values in the configuration file before app build or change configuration values during runtime (app execution). For more details, check the Hive SDK configuration.