Unity
This guide provides instructions for setting up authentication in the Hive SDK for Unity.
Unity hive config editor settings¶
Hive > Hive Config (Edit Config) After selecting, enter the necessary values in the Unity Hive Config Editor screen under the Execution Environment, Common, Auth tabs.
Android
iOS
EDM4U plugin settings¶
When the settings window appears, please select the feature you want to use.
{width="450px"}
Feature addition¶
Select only the authentication features you want to use in the Hive Module Settings.
- Device Management: Device Management Service
- reCAPTCHA: Using Google Recaptcha for guest login
- Real Name Verification: A feature that requires users accessing from China to undergo real name verification for games that have received a Chinese license
- Google InAppUpdate: Google In-App Update feature (Android)
Note
For detailed guidance on each feature, please refer to the following.
Add IdP¶
In the Auth Settings, select only the IdP you want to use. For example, to use the Google IdP, select Google SignIn in the Auth Settings. To use the GooglePlayGames IdP, select Google Play Games. Another example is to select Facebook in the Auth Settings if you want to use Facebook login.
Note
To apply the VK library in the Unity Android build, a minSdkVersion of 21 or higher and a targetSdkVersion of 32 or higher are required. Please add VK settings according to the following.
To apply the Line library in the Unity Android build, a minSdkVersion of 24 or higher is required.
Unity login simulator (optional)¶
Using the Unity login simulator, you can temporarily issue an AuthV4 guest account available in the Hive Sandbox server environment.
The Unity login simulator feature can be checked as shown below in the Hive > LoginSimulator > Open AuthV4 Setting menu.
To use this feature, you must meet the following conditions.
- hive_config.xml Complete configuration
- In the Unity-Build settings menu, write appId in the current platform (iOS, Android, Windows, Mac) hive_config.xml (auto-filled)
- Enter the Hive authentication key
After that, every time you press the Create button, a new guest account will be issued, and the account information will be saved as a file.
You can obtain temporary guest account information through the following example code. The did
and other additional information, excluding playerId
and playerToken
, are values that are temporarily generated or specified by the client.
// playerId issued from the Hive Sandbox server
long playerId = AuthV4LoginData.playerId;
// playerToken issued from the Hive Sandbox server
string playerToken = AuthV4LoginData.playerToken;
// playerName set temporarily by the client
string playerName = AuthV4LoginData.playerName;
// playerImageUrl set temporarily by the client
string plalyerImageUrl = AuthV4LoginData.playerImageUrl;
// did set temporarily by the client (random value between 1000000000 and 2000000000)
string did = AuthV4LoginData.did;
Warning
This account is a guest account issued temporarily for convenient testing on the Unity Editor screen, specifically for Hive Sandbox. Care must be taken to ensure that it does not mix with information from accounts used in commercial services.