docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SwitchProfile

    SwitchProfile(string)

    Switch the current profile. You can use profiles to sign in to multiple accounts on a single device. A profile isolates the values saved to the PlayerPrefs. The profile may only contain alphanumeric values, -, _, and must be no longer than 30 characters. The player must be signed out for this operation to succeed.

    Declaration
    void SwitchProfile(string profile)
    Parameters
    Type Name Description
    string profile

    The profile to switch to.

    Exceptions
    Type Condition
    AuthenticationException

    The task fails with the exception when the task cannot complete successfully due to Authentication specific errors.

    • Throws with ErrorCode ClientInvalidUserState if the player is not signed out.
    • Throws with ErrorCode ClientInvalidProfile if the profile name is invalid.
    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)