QueryCanBind [Player Network SDK Only]
[Player Network SDK Only] Queries if an account can be linked. Currently, only custom accounts are supported.
According to whether the account has registered the callback data, the member variables of GUAAccountResult will be as follows:
- If no account is registered:
can_bind
returnstrue
.is_register
returnsfalse
.
- If an account is registered:
is_register
returns true.- If login linking is enabled (with OpenID),
can_bind
returnsfalse
. - If login linking is not enabled (no OpenID),
can_bind
returnstrue
.
Supported Platform
- Unity
- Unreal Engine
Supports
Android, iOS, Windows
platform.Supports
Android, iOS, Windows
platform.Function Definition
- Unity
- Unreal Engine
void QueryCanBind(int channelid, int accountPlatType, string account, string phoneAreaCode, string extraJson = "{}");
static void QueryCanBind(
int32_t channelid,
int32_t account_plat_type,
const std::string &account,
const std::string &phone_area_code,
const std::string &extra_json = "{}");
Input Parameters
- Unity
- Unreal Engine
Parameter | Type | Description |
---|---|---|
channelid | int | Custom account channel ID ACCOUNT_PLAT_TYPE assigned by Player Network Console |
accountPlatType | int | Platform type ID of the corresponding channel |
account | string | Account Can be an email address or phone number. |
phoneAreaCode | string | Mobile phone area code Such as "86" for China, fill in blanks if the account is an email |
extraJson | string | Extended Information |
Parameter | Type | Description |
---|---|---|
channelid | int32_t | Custom account channel ID ACCOUNT_PLAT_TYPE assigned by Player Network Console |
account_plat_type | int32_t | Platform type ID of the corresponding channel |
account | std::string | Account Can be an email address or phone number. |
phone_area_code | std::string | Mobile phone area code Such as "86" for China, fill in blanks if the account is an email |
extra_json | std::string | Extended Information |
Callback Processing
The callback processing API is GUAAccountResultObservers. The callback data structure is GUAAccountResult.
- Unity
- Unreal Engine
The callback event is AccountEvents.
The callback methodID is GUA_ACCOUNT_QUERY_CAN_BIND
.
The callback event is OnAccountResultNotify.
The callback methodID is kMethodIDAccountQueryCanBind
.
Code Sample
- Unity
- Unreal Engine
UnionAdapterAPI.GetAccountService().QueryCanBind(1, 1, "account", "86");
GUA_NAMESPACE::GUAAccountService::QueryCanBind(1, 1, "Account", "86");