Skip to content

Unreal

This document guides you through setting up authentication in Hive SDK Unreal.

Feature addition

  1. Click Edit > Project Settings from the Unreal Editor menu. The Project Settings window will appear.
  2. In the Project Settings window, click Dependency – Android / Dependency – iOS under the Hive SDK in the left panel.

  3. Select only the authentication features you want to use from Hive Module.

    • Enable DeviceManagement: Device Management Service
    • Enable reCAPTCHA: Use Google Recaptcha for guest login
    • Enable RealNameVerification: This feature enables real-name verification for users accessing the game in China, only for games that have obtained a Chinese license.
    • Enable GoogleInAppUpdate: Google In-App Update feature (Android)

IdP addition

  1. Click Edit > Project Settings from the Unreal Editor menu. The Project Settings window will appear.
  2. In the Project Settings window, click Dependency – Android / Dependency – iOS under the Hive SDK in the left panel.

    3. Select only the IdPs you want to use from Auth.

IdP-specific additional settings

Additional settings are required depending on the IdP.

Facebook IdP settings

These are the settings for using Facebook IdP. Click Edit > Project Settings from the Unreal Editor menu. The Project Settings window will appear. In the Project Settings window, click the HIVEConfig XML menu under the plugin title in the left panel. The HIVEConfig XML settings screen will appear.


In the HIVEConfig XML screen, enter the Facebook AppID for the game in the Facebook App ID field of the Facebook Settings group.

Google IdP settings

These are the settings for using a general Google IdP. Click Edit > Project Settings from the Unreal Editor menu. The Project Settings window will appear. In the Project Settings window, click the HIVEConfig XML menu under the plugin title in the left panel. The HIVEConfig XML settings screen will appear.


In the HIVEConfig XML screen, enter the AppID obtained from the Google Console in the Google Play App ID field of the Google Play Settings settings.

Google Play Games IdP settings

These are the settings for using Google Play Games IdP.

HIVEConfig XML settings

Click Edit > Project Settings from the Unreal Editor menu. The Project Settings window will appear. In the Project Settings window, click the HIVEConfig XML menu under the plugin title in the left panel. The HIVEConfig XML settings screen will appear.


In the HIVEConfig XML screen, enter the Google Play Games Service AppID in the Google Play App ID field of the Google Play Settings settings.

Disable built-in Google Play Games authentication

When using Google Play Games authentication in the Unreal Android environment, there is a compatibility issue between the Hive SDK and Unreal Engine's built-in Google Play Games authentication that needs to be resolved. First, open the following files:


  • Unreal Engine 4
    • ./Engine/Build/Android/Java/src/com/epicgames/ue4/GameActivity.java.template
  • Unreal Engien 5
    • ./Engine/Build/Android/Java/src/com/epicgames/ue4/GameActivity.java.template
    • ./Engine/Build/Android/Java/src/com/epicgames/unreal/psoservices/PSOProgramServiceAccessor.java


Remove the following line from the files:

import com.google.android.gms.games.Games;
Note

Google authentication is different from Google Play Games authentication. You do not need to remove the above line if you are using Google authentication.

Apple game center IdP settings

To use the Apple Game Center IdP, you need to add the Apple Game Center Entitlements settings. In the Unreal Engine Editor project settings, follow these steps:

  1. Click on Edit > Project Settings in the Unreal Editor menu. The Project Settings window will appear. Click on the <b(iOS) menu under the platform title in the left panel of the Project Settings window. The iOS settings screen will appear.
  2. In the iOS settings screen, check the Enable Game Center Support item under the online title.