管理配置文件
Create and manage multiple player profiles on a single device to allow players to sign in with different accounts.
阅读时间1 分钟最后更新于 1 个月前
玩家可以使用配置文件在一台设备上登录多个帐户。配置文件为保存到
PlayerPrefs切换配置文件
玩家必须注销才能切换当前的配置文件。使用AuthenticationService.Instance.SwitchProfile(profileName)SwitchProfileAuthenticationExceptionAuthenticationErrorCodes.ClientInvalidUserStateSwitchProfileAuthenticationExceptionAuthenticationErrorCodes.ClientInvalidProfile当前配置文件
要查看当前配置文件,请使用AuthenticationService.Instance.Profile默认配置文件
如果初始化选项中未提供配置文件,则会使用default在初始化时设置配置文件
您也可以在初始化UnityServicesAuthenticationServicedefaultasync Task InitializeUnityServices(){ var options = new InitializationOptions(); options.SetProfile(“test_profile”); await UnityServices.InitializeAsync(options);}