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

PlayerPrefs

Understand how Unity Authentication uses player preferences to securely store authentication tokens.
Read time 1 minute
Last updated 9 months ago

After logging in, the session token is saved in
PlayerPrefs
, a class that stores Player preferences between game sessions. It can store
string
,
float
and
integer
values into the player's platform registry.
Unity uses the following key format to isolate the tokens:
$CloudProjectId.$Profile.unity.services.authentication.session_token
.
The location depends on the platform.
See the PlayerPrefs script reference documentation for more details.

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.


    Report a problem with this page