Login
[Player Network SDK and MSDK] Log in to the specified channel.
Supported Platform
- Unity
- Unreal Engine
Supports
Android, iOS, Windows platform.Supports
Android, iOS, Windows platform.Function Definition
- Unity
- Unreal Engine
void Login(string channel, string permissions = "", string subChannel = "", string extraJson = "{}");
static void Login(const std::string &channel, const std::string &permissions = "", const std::string &sub_channel = "", const std::string &extra_json = "{}");
Input Parameters
- Unity
- Unreal Engine
| Parameter | Type | Description |
|---|---|---|
| channel | string | The specified channel to login |
| permissions | string | The list of permissions authorized to the login channel. Separate the permissions by commas. For example, "user_info,inapp_friends". For more information, see relative channel descriptions. |
| subChannel | string | Sub-channel name For example, Facebook or Twitter. |
| extraJson | string | The extended field. For more information, see relative channel descriptions. |
| Parameter | Type | Description |
|---|---|---|
| channel | std::string | The specified channel to login |
| permissions | std::string | The list of permissions authorized to the login channel. Separate the permissions by commas. For example, "user_info,inapp_friends". For more information, see relative channel descriptions. |
| sub_channel | std::string | Sub-channel name For example, Facebook or Twitter. |
| extra_json | std::string | The extended field. For more information, see relative channel descriptions. |
Callback Processing
The callback processing API is GUALoginResultObservers. The callback data structure is GUALoginResult.
- Unity
- Unreal Engine
The callback event is LoginResultEvents.
The callback methodID is GUA_ACCOUNT_LOGIN.
The callback event is OnLoginResultNotify.
The callback methodID is kMethodIDAccountLogin.
Code Sample
- Unity
- Unreal Engine
UnionAdapterAPI.GetAccountService().Login("WeChat");
GUA_NAMESPACE::GUAAccountService::Login("WeChat");