docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method UpdatePlayerNameAsync

    UpdatePlayerNameAsync(string)

    Updates the player name of the logged in player.

    Declaration
    Task<string> UpdatePlayerNameAsync(string name)
    Parameters
    Type Name Description
    string name

    The new name for the player. It must not contain spaces.

    Returns
    Type Description
    Task<string>

    Task for the operation with the resulting player name

    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 authorized to perform this operation.
    • Throws with ErrorCode InvalidParameters if the provided player name is invalid.
    RequestFailedException

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

    • 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)