Unity
In the Unity environment, you can automatically generate the hive_config.xml file and assign configuration values using the Unity Inspector. hive_config.xml is recommended because it eliminates the need to directly configure the hive_config.xml file and AndroidManifest.xml during Android app development.
OS and authentication version settings¶
Select Hive > Edit Config and configure the necessary values in the Inspector screen. First, select the OS and Authentication Version. For example, to use Google authentication, select Android or iOS for OS, depending on the platform, and Auth v4 for Authentication Version.
IdP settings¶
For each IdP you want to use, such as Facebook and Google, you need to enter AppID, ClientID, and other information. For example, to use regular Google authentication, enter the necessary values in the Google Sign-in Settings item as follows.
- Enter the AppID you received in the Google App Id field.
- Enter the Client ID value for the web application you received in the Google Server Client ID field.
Info
For more information, see the Authentication Guide.
HiveConfig settings¶
The hive_config.xml file is generated and assigned configuration values. The hive_config.xml file is generated in the following location.
- Android
- 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
- Unity 2021 and above:
- iOS
/Assets/Plugins/iOS/hive_config.xml
- Windows
/Assets/Plugins/Windows/res/hive_config.xml
The HiveConfig Settings allows you to configure the following values. For example, to use Google Play Store payment, set the Market
value to GO
, and to use Apple AppStore payment, set it to AP
.
Field | Description | Value Range |
---|---|---|
Zone | Hive server environment |
|
Logging | Hive client's internal operation logging activation status |
|
Push | Whether to use the push service provided by the Hive platform |
|
Company | Game publishing company |
|
Channel | Login service platform used by the game app. | Hive (default) |
Market | Market where the app will be released |
|
hivePermissionViewOn | Hive SDK permission notification popup visibility |
|
Other settings¶
WriteExternalStoragePermission: A value required for Unity Android, this setting determines whether to request external storage permission from the user. If checked, the Hive client will request external storage permission from the user when initialized on the device.
hive_config.xml file generation¶
After configuring the Inspector, follow the steps below to generate the hive_config.xml file.
- Android: Click the Regenerate Android Manifest & Hive Config button to generate the AndroidManifest.xml file and the hive_config.xml file. The hive_config.xml file will be generated 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 Regenerate iOS Plist Hive Config button to generate the Info.plist file and the hive_config.xml file. The hive_config.xml file will be generated in the following directory:
/Assets/Plugins/iOS/ - Windows: Click the Windows Button button to generate the hive_config.xml file. The hive_config.xml file will be generated in the following directory:
Assets/Plugins/Windows/res/