Skip to content

Unreal

This guide provides instructions for 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 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 accessing 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.

Enter the key values by IdP in hive_config.xml

Enter the key values obtained from each IdP console in hive_config.xml. For more details, please refer to Authentication Prerequisites.

Hive config editor settings

Hive SDK Unreal allows you to configure hive_config.xml using the Hive Config Editor.

Facebook

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. 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 Facebook console information in the Provider > AuthV4 > Facebook field.
Warning

If you use Facebook IdP, due to the automatic configuration within the Hive SDK for building Facebook sharing activation, you cannot install market-specific Android builds (e.g., Google Play Store, One Store) simultaneously.

If you are not using Facebook sharing activation, please refer to the troubleshooting guide to remove the FacebookContentProvider permission declaration.

Google play games

  1. Click on Edit > Project Settings in the Unreal Editor menu. The project settings window will appear on the screen.
  2. In the left panel of the project settings window, click on 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.

Other IdP

Like Facebook and Google Play Games, enter the key values obtained from each IdP console in the corresponding IdP field on the HIVEConfig XML settings screen Provider > AuthV4.

Additional settings by IdP

Additional configuration is required depending on the IdP.

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 lines below 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 the 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.