docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SignInAnonymouslyAsync

    SignInAnonymouslyAsync(SignInOptions)

    Signs in the current player anonymously. No credentials are required and the session is confined to the current device.

    Declaration
    Task SignInAnonymouslyAsync(SignInOptions options = null)
    Parameters
    Type Name Description
    SignInOptions options

    Options for the operation

    Returns
    Type Description
    Task

    Task for the operation

    Remarks

    If a player has signed in previously with a session token stored on the device, they are signed back in regardless of if they're an anonymous player or not.

    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 has already signed in or a sign-in operation is in progress.
    RequestFailedException

    The task fails with the exception when the task cannot complete successfully.

    • Throws with ErrorCode InvalidToken if the server side returned an invalid access token.
    • Throws with ErrorCode TransportError if the API call failed due to network error. Check Unity logs for more debugging information.
    • Throws with ErrorCode Unknown if the API call failed due to unexpected response from the server. Check Unity logs for more debugging information.
    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)