Skip to content

Unreal

This provides guidance on setting up authentication in the Hive SDK for Unreal Engine.

Feature addition

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

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

    • Enable DeviceManagement: Device Management Service
    • Enable reCAPTCHA: Use Google Recaptcha for guest login
    • Enable RealNameVerification: A feature that requires users connecting from China to undergo real-name verification for games that have received a Chinese license
    • Enable GoogleInAppUpdate: Google In-App Update feature (Android)

Add IdP

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

  3. Select only the IdP you want to use in Auth.

IdP-specific additional settings

Additional configuration is required depending on the IdP.

Facebook IdP configuration

The configuration for using Facebook IdP is as follows.

  1. Click Edit > Project Settings in the Unreal Editor menu. The project settings window will appear on the screen.
  2. Click the Hive Config menu in the left panel of the project settings window. The HIVEConfig XML settings screen will appear.
  3. In the HIVEConfig XML screen, enter the Facebook console information in the Provider > AuthV4 > Facebook field.

Google Play Games IdP settings

The configuration for using Google Play Games IdP is as follows.

HIVEConfig XML settings

  1. Click Edit > Project Settings in the menu of Unreal Editor. The project settings window will appear on the screen.
  2. In the left panel of the project settings window, click the Hive Config menu. The HIVEConfig XML settings screen will appear.
  3. In the HIVEConfig XML screen, enter the Google Play Games console information in the Provider > AuthV4 > GooglePlayGames field.

Disable built-in Google Play Games authentication

When using Google Play Games authentication in the Unreal Android environment, here is how to resolve compatibility issues between the Hive SDK and the built-in Google Play Games authentication in Unreal Engine.

  1. Open the following files.
    • Unreal Engine 4
      • ./Engine/Build/Android/Java/src/com/epicgames/ue4/GameActivity.java.template
    • Unreal Engine 5
      • ./Engine/Build/Android/Java/src/com/epicgames/ue4/GameActivity.java.template
      • ./Engine/Build/Android/Java/src/com/epicgames/unreal/psoservices/PSOProgramServiceAccessor.java
  2. Remove the following lines from the file.

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

Google authentication is different from Google Play Games authentication, and there is no need to remove the above line when using Google authentication.

Apple Game Center IdP configuration

To use Apple Game Center IdP, you need to add Apple Game Center Entitlements settings. Set it up as shown below in the Unreal Engine Editor project settings.

  1. Click Edit > Project Settings in the Unreal Editor menu. The project settings window will appear on the screen.
  2. In the project settings window, click the iOS menu under the platform title in the left panel. The iOS settings screen will appear.
  3. In the iOS screen, check the Enable Game Center Support option under the online title.