ข้ามไปที่เนื้อหา

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
  • วินโดวส์
    • /HIVESDK/Source/HIVESDK/ThirdParty/Windows/config/hive_config.xml

การตั้งค่าด้วย Unreal editor

ในสภาพแวดล้อม Unreal คุณสามารถสร้างไฟล์ hive_config.xml โดยอัตโนมัติและกำหนดค่าใช้ค่าคอนฟิกผ่าน Unreal Editor

วิธีการกำหนดค่าไฟล์ hive_config.xml เพื่อใช้ Hive ใน Unreal Editor มีดังนี้

คลิกที่ แก้ไข > การตั้งค่าโครงการ ในเมนู Unreal Editor หน้าต่างการตั้งค่าโครงการจะปรากฏบนหน้าจอ ในแผงด้านซ้ายของหน้าต่างการตั้งค่าโครงการ ให้คลิกที่เมนู Hive Config หน้าจอการตั้งค่า XML ของ HIVEConfig จะปรากฏขึ้น

hive_config.xml ตัวอย่าง

ด้านล่างนี้คือตัวอย่างของไฟล์ hive_config.xml เมื่อใช้การตรวจสอบสิทธิ์ (การตรวจสอบสิทธิ์ของ Google) และการชำระเงิน (Google Play Store หรือ Apple AppStore) โปรดเปลี่ยน แก้ไข หรือ ลบค่า ตามฟีเจอร์ SDK ของ Hive ที่คุณต้องการใช้และสภาพแวดล้อมของแอป เนื่องจาก iOS รองรับการชำระเงินผ่าน Apple AppStore เท่านั้น ให้ตั้งค่าตลาดเป็น AP ในสภาพแวดล้อม Unreal iOS

<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.