NAV
Unity

UIKit GS2-Account Sample

Performs account creation and login processes.

It also performs account linking and takeover processing.
Must run on iOS or Android mobile devices.
Native login for Sign in with Apple and Sign in with Google on iOS, and
Supports Sign in with Google native login on Android.

Folder structure

Sample folder:

(Unity project)/Assets/Game Server Services/Samples/UIKit/Gs2Account/

Sample scene :

(sample folder)/Scenes/Account.unity

GS2-Deploy Sample Templates:

(sample folder)/Settings/initialize_account_template.yaml

Explanation

The scene contains a Gs2 game object that holds the Gs2AccountAutoLogin prefab and the Gs2ClientHolder component.

When the scene is played, the Gs2ClientHolder performs the initialization process for the GS2 SDK and makes the SDK accessible in Gs2ClientHolder.Instance.

The Gs2AccountAutoLogin component held in the Gs2AccountAutoLogin prefab waits for the Gs2ClientHolder initialization process to complete, and then sends the Gs2AccountAutoLogin.Instance to the Gs2AccountAutoLogin prefab.
When completed, the login process is executed.

The access token is information needed to identify the game player when calling GS2's API.
Access tokens have an expiration date and must be reacquired before they expire, but they are automatically updated when using the UI Kit, so developers do not need to think about refreshing access tokens.