跳转至

Unreal Engine 4

按照以下说明创建和配置hive_config.xml文件。该文件将创建在以下路径。有关更多详细信息,请参阅基本配置指南

<

  • 安卓
    • /HIVESDK/Source/HIVESDK/ThirdParty/android/resource/res/raw/hive_config.xml
  • iOS
    • /HIVESDK/Source/HIVESDK/ThirdParty/iOS/resource/hive_config.xml
  • Windows
    • /HIVESDK/Source/HIVESDK/ThirdParty/Windows/config/hive_config.xml

使用虚幻编辑器进行设置

在虚幻环境中,您可以使用虚幻编辑器自动创建hive_config.xml文件并分配配置值。

在Unreal Editor中使用Hive的hive_config.xml文件配置方法如下。

在虚幻编辑器菜单中点击编辑 > 项目设置。项目设置窗口将出现在屏幕上。在项目设置窗口的左侧面板中,点击Hive 配置菜单。HIVEConfig XML设置屏幕将出现。

hive_config.xml 示例

以下是使用身份验证(Google 身份验证)和支付(Google Play 商店或 Apple AppStore)时的 hive_config.xml 文件示例。请根据您想要使用的 Hive SDK 功能和应用环境更改、添加或删除值。由于 iOS 仅支持 Apple AppStore 支付,请在 Unreal iOS 环境中将市场设置为 AP

<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

Hive SDK 配置可以在应用构建之前将值保存在配置文件中,或在运行时(应用执行期间)更改配置值。有关更多详细信息,请查看 Hive SDK 配置