CanBind [MSDK Only]
[MSDK Only] Queries if an account can be linked. Currently, only custom accounts are supported.
Supported Platform
- Unity
- Unreal Engine
Supports
Android, iOS, Windows
platform.Supports
Android, iOS, Windows
platform.Function Definition
- Unity
- Unreal Engine
void CanBind(string channel, string channelInfo, string extraJson = "{}");
static void CanBind(const std::string &channel, const std::string &channel_info, const std::string &extra_json = "{}");
Input Parameters
- Unity
- Unreal Engine
Parameter | Type | Description |
---|---|---|
channel | string | Custom account channel ID ACCOUNT_PLAT_TYPE assigned by Player Network Console |
channelInfo | string | Corresponding channel information |
extraJson | string | Extended Information |
Parameter | Type | Description |
---|---|---|
channel | string | Custom account channel ID ACCOUNT_PLAT_TYPE assigned by Player Network Console |
channel_info | string | Corresponding channel information |
extra_json | 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_CAN_BIND
.
The callback event is OnAccountResultNotify.
The callback methodID is kMethodIDAccountCanBind
.
Code Sample
- Unity
- Unreal Engine
UnionAdapterAPI.GetAccountService().CanBind("WeChat", "channelInfo");
GUA_NAMESPACE::GUAAccountService::CanBind("WeChat", "channelInfo");