跳轉至

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

使用 Unreal 編輯器進行設置

在虛幻環境中,您可以使用虛幻編輯器自動創建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 配置