# PlayerPrefs

> Understand how Unity Authentication uses player preferences to securely store authentication tokens.

登录后，会话令牌保存在 `PlayerPrefs` 中，这是用于在游戏会话之间存储玩家偏好设置的类。它可以将 `string`、`float` 和 `integer` 值存储进玩家的平台注册表。

Unity 使用以下 key 格式来隔离令牌：

`$CloudProjectId.$Profile.unity.services.authentication.session_token`。

其位置取决于平台。

要了解更多详细信息，请查看 [PlayerPrefs](https://docs.unity3d.com/ScriptReference/PlayerPrefs.html) 脚本参考文档。
