Skip to main content

Switch account login

[Shared by Player Network SDK & MSDK] Choose to switch account login when encountering a different account.

Supported platforms

Supports Android, iOS, Windows platform.
note

MSDK does not currently support Windows

Function Definition

bool SwitchUser(bool useLaunchUser);

Return Value

This API returns a bool value. true means success, false means unable to switch account.

Input Parameters

ParametersTypeDescription
useLaunchUserboolWhether to switch account login

Callback Handling

The callback handling interface is GUALoginResultObservers.The callback data structure is GUALoginResult.

The callback event is LoginResultEvents. The callback ID is GUA_ACCOUNT_SWITCH_USER.

Code Example

bool isSucceeded = UnionAdapterAPI.GetAccountService().SwitchUser(true);