登出
[Player Network SDK 和 MSDK 共有] 登出当前渠道。
支持的平台
- Unity
- Unreal Engine
支持
Android, iOS, Windows 平台。支持
Android, iOS, Windows 平台。函数定义
- 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);
入参说明
- Unity
- Unreal Engine
| 参数 | 类型 | 说明 |
|---|---|---|
| channel | string | 需要登出的渠道名称 |
| subChannel | string | 子渠道名 例如 Facebook, Twitter 等 |
| channelOnly | bool | 仅登出渠道 |
| 参数 | 类型 | 说明 |
|---|---|---|
| channel | std::string | 需要登出的渠道名称 |
| sub_channel | std::string | 子渠道名 例如 Facebook, Twitter 等 |
| channel_only | bool | 仅登出渠道 |
回调处理
回调处理接口是 GUABaseResultObservers。回调数据结构是 GUABaseResult。
- Unity
- Unreal Engine
回调事件是 LoginBaseResultEvents。 回调 ID 是 GUA_ACCOUNT_LOGOUT。
回调事件是 OnBaseResultNotify。 回调 ID 是 kMethodIDAccountLogout。
代码示例
- Unity
- Unreal Engine
UnionAdapterAPI.GetAccountService().Logout("WeChat");
GUA_NAMESPACE::GUAAccountService::Logout("WeChat");