Logout
[Shared by Player Network SDK & MSDK] Log out of the current channel.
Supported platforms
- Unity
- Unreal Engine
Supports
Android, iOS, Windows platform.Supports
Android, iOS, Windows platform.Function Definition
- Unity
- Unreal Engine
void Logout(string channel = "", string subChannel = "", bool channelOnly = false);
static void Logout(const std::string &channel = "", const std::string &sub_channel = "", bool channel_only = false);
Input Parameters
- Unity
- Unreal Engine
| Parameters | Type | Description |
|---|---|---|
| channel | string | Name of the channel to log out |
| subChannel | string | Sub-channel name For example, Facebook, Twitter, etc. |
| channelOnly | bool | Only log out from the specified channel |
| Parameters | Type | Description |
|---|---|---|
| Channel | std::string | Name of the channel to log out |
| sub_channel | std::string | Sub-channel name For example, Facebook, Twitter, etc. |
| channel_only | bool | Only log out from the specified channel |
Callback Handling
The callback handler interface is GUABaseResultObservers.The callback data structure is GUABaseResult.
- Unity
- Unreal Engine
The callback event is LoginBaseResultEvents. The callback ID is GUA_ACCOUNT_LOGOUT.
The callback event is OnBaseResultNotify. The callback ID is kMethodIDAccountLogout.
Code Example
- Unity
- Unreal Engine
UnionAdapterAPI.GetAccountService().Logout("WeChat");
GUA_NAMESPACE::GUAAccountService::Logout("WeChat");