Manage profiles
Create and manage multiple player profiles on a single device to allow players to sign in with different accounts.
Read time 1 minuteLast updated 15 hours ago
Players can use profiles to sign in to multiple accounts on a single device. Profiles add a level of isolation to the values saved to the
PlayerPrefsSwitch profiles
Players must be signed out to switch the current profile. UseAuthenticationService.Instance.SwitchProfile(profileName)SwitchProfileAuthenticationExceptionAuthenticationErrorCodes.ClientInvalidUserStateSwitchProfileAuthenticationExceptionAuthenticationErrorCodes.ClientInvalidProfileCurrent profile
To view the current profile, useAuthenticationService.Instance.ProfileDefault profile
If no profile is provided in the initialization options, the valuedefaultSet the profile at initialization
Optionally, you can set the profile when initializingUnityServicesAuthenticationServicedefaultasync Task InitializeUnityServices(){ var options = new InitializationOptions(); options.SetProfile("test_profile"); await UnityServices.InitializeAsync(options);}