Documentation

​
​

Development

User Acquisition

Monetization

Industry

Authentication

Unity SDK

Admin API

Client API

Open Unity Dashboard

Authentication

LiveOps
​
​
Authentication
  • Overview
  • Get started
  • Concepts
    • How Authentication works
    • Approaches to authentication
    • Sessions and cached players
    • Manage profiles
    • Manage player names
    • Manage linked external identities
    • Player prefs
    • Delete accounts
    • Authentication native SDK
    • Digital Services Act Notifications
  • Tutorials
  • Reference
  • Privacy and consent
  1. Unity Authentication

Manage profiles

Create and manage multiple player profiles on a single device to allow players to sign in with different accounts.
Read time 1 minute
Last updated 9 months 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
PlayerPrefs
. Profiles are not automatically persisted; it’s up to developers to determine how to manage them.

Switch profiles

Players must be signed out to switch the current profile. Use
AuthenticationService.Instance.SwitchProfile(profileName)
. The profile name only supports alphanumeric values, `-`, `_` and has a maximum length of 30 characters.
If a player is not signed out,
SwitchProfile
throws an
AuthenticationException
with the error code
AuthenticationErrorCodes.ClientInvalidUserState
.
If an invalid name is used,
SwitchProfile
throws an
AuthenticationException
with the error code
AuthenticationErrorCodes.ClientInvalidProfile

Current profile

To view the current profile, use
AuthenticationService.Instance.Profile
.

Default profile

If no profile is provided in the initialization options, the value
default
is used.

Set the profile at initialization

Optionally, you can set the profile when initializing
UnityServices
. The
AuthenticationService
uses the value
default
if no profile is provided.
async Task InitializeUnityServices(){ var options = new InitializationOptions(); options.SetProfile("test_profile"); await UnityServices.InitializeAsync(options);}


Copyright © 2026 Unity Technologies
LegalPrivacy PolicyCookiesDocumentation Terms of UseDo Not Sell or Share My Personal InformationYour Privacy Choices (Cookie Settings)

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S and elsewhere (more info here). Other names or brands are trademarks of their respective owners.

Some pages are machine-translated for convenience, and may contain inaccuracies. In the event of conflicting information, the English version is authoritative.

  • On this page
    • Switch profiles

    • Current profile

    • Default profile

    • Set the profile at initialization


Report a problem with this page