使用映射渠道登录(LoginWithMappedChannel)[仅限 Player Network SDK]
[仅限 Player Network SDK] 使用映射渠道登录。
支持的平台
- Unity
- Unreal Engine
支持
Windows 平台。支持
Android, iOS, Windows 平台。函数定义
- Unity
- Unreal Engine
void LoginWithMappedChannel(string channel, string permission, string extraJson);
static void LoginWithMappedChannel(const std::string &channel, const std::string &permission, const std::string &extra_json = "{}");
入参说明
- Unity
- Unreal Engine
| 参数 | 类型 | 说明 |
|---|---|---|
| channel | string | 需要登录的渠道 |
| permission | string | 登录时授权权限列表,多个权限用逗号分隔. |
| extraJson | string | 扩展字段 更多信息,请参见相对渠道说明。 |
| 参数 | 类型 | 说明 |
|---|---|---|
| channel | std::string | 需要登录的渠道 |
| permission | std::string | 登录时授权权限列表,多个权限用逗号分隔. |
| extra_json | std::string | 扩展字段 更多信息,请参见相对渠道说明。 |
回调处 理
回调处理接口是 GUALoginResultObservers。回调数据结构是 GUALoginResult。
- Unity
- Unreal Engine
回调事件是 LoginResultEvents。 回调 ID 是 GUA_ACCOUNT_LOGIN_WITH_MAPPED_CHANNEL.
回调事件是 OnLoginResultNotify。 回调 ID 是 kMethodIDAccountLoginWithMappedChannel。
代码示例
- Unity
- Unreal Engine
UnionAdapterAPI.GetAccountService().LoginWithMappedChannel("Epic");
GUA_NAMESPACE::GUAAccountService::LoginWithMappedChannel("Epic");