docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IPlayerNamesApi

    Represents a collection of functions to interact with the API endpoints

    Inherited Members
    IApiAccessor.Configuration
    IApiAccessor.GetBasePath()
    Namespace: Unity.Services.Apis.PlayerNames
    Assembly: solution.dll
    Syntax
    public interface IPlayerNamesApi : IApiAccessor

    Methods

    GetName(string, bool?, bool?, CancellationToken)

    Get a player's name.

    Declaration
    ApiOperation<Player> GetName(string playerId, bool? autoGenerate = null, bool? showMetadata = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string playerId

    The player's ID.

    bool? autoGenerate

    Indicates if a player without a name should have one auto generated or not. Defaults to true. (optional)

    bool? showMetadata

    If true, returns additional metadata like 'autoGenerated' with records. Defaults to false. (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<Player>

    The operation

    UpdateName(string, UpdateNameRequest, CancellationToken)

    Update a player's name.

    Declaration
    ApiOperation<Player> UpdateName(string playerId, UpdateNameRequest updateNameRequest, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string playerId

    The player's ID.

    UpdateNameRequest updateNameRequest
    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation<Player>

    The operation

    In This Article
    Back to top
    Copyright © 2024 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)