docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IGameClient

    The Game Client offers apis to achieve player-scale outcomes. It relies on player authentication to authorize most api calls.

    Namespace: Unity.Services.Apis
    Assembly: Unity.Services.Apis.dll
    Syntax
    public interface IGameClient

    Properties

    AccessToken

    The access token applied to apis.

    Declaration
    string AccessToken { get; }
    Property Value
    Type Description
    string

    Analytics

    Analytics Api

    Declaration
    IAnalyticsApi Analytics { get; }
    Property Value
    Type Description
    IAnalyticsApi

    CloudCode

    CloudCode Api

    Declaration
    ICloudCodeApi CloudCode { get; }
    Property Value
    Type Description
    ICloudCodeApi

    CloudSaveData

    CloudSave Player Data Api

    Declaration
    ICloudSaveDataApi CloudSaveData { get; }
    Property Value
    Type Description
    ICloudSaveDataApi

    CloudSaveFiles

    CloudSave Files Api

    Declaration
    ICloudSaveFilesApi CloudSaveFiles { get; }
    Property Value
    Type Description
    ICloudSaveFilesApi

    EconomyConfiguration

    Economy Configuration Api

    Declaration
    IEconomyConfigurationApi EconomyConfiguration { get; }
    Property Value
    Type Description
    IEconomyConfigurationApi

    EconomyCurrencies

    Economy Currencies Api

    Declaration
    IEconomyCurrenciesApi EconomyCurrencies { get; }
    Property Value
    Type Description
    IEconomyCurrenciesApi

    EconomyInventory

    Economy Inventory Api

    Declaration
    IEconomyInventoryApi EconomyInventory { get; }
    Property Value
    Type Description
    IEconomyInventoryApi

    EconomyPurchases

    Economy Purchases Api

    Declaration
    IEconomyPurchasesApi EconomyPurchases { get; }
    Property Value
    Type Description
    IEconomyPurchasesApi

    Leaderboards

    Leaderboards Api

    Declaration
    ILeaderboardsApi Leaderboards { get; }
    Property Value
    Type Description
    ILeaderboardsApi

    Lobby

    Lobby Api

    Declaration
    ILobbyApi Lobby { get; }
    Property Value
    Type Description
    ILobbyApi

    PlayerAuthentication

    Player Authentication Api

    Declaration
    IPlayerAuthenticationApi PlayerAuthentication { get; }
    Property Value
    Type Description
    IPlayerAuthenticationApi

    PlayerNames

    Player Names Api

    Declaration
    IPlayerNamesApi PlayerNames { get; }
    Property Value
    Type Description
    IPlayerNamesApi

    QosDiscovery

    Qos Discovery Api

    Declaration
    IQosDiscoveryApi QosDiscovery { get; }
    Property Value
    Type Description
    IQosDiscoveryApi

    RelayAllocations

    Relay Allocations Api

    Declaration
    IRelayAllocationsApi RelayAllocations { get; }
    Property Value
    Type Description
    IRelayAllocationsApi

    RemoteConfig

    Remote Config Api

    Declaration
    IRemoteConfigSettingsApi RemoteConfig { get; }
    Property Value
    Type Description
    IRemoteConfigSettingsApi

    Methods

    ClearAnalyticsUserId()

    Clears the analytics user id from the headers of the supported services

    Declaration
    void ClearAnalyticsUserId()

    ClearCredentials()

    Clears the credentials from the configuration of all apis

    Declaration
    void ClearCredentials()

    ClearInstallationId()

    Clears the installation id from the headers of the supported services

    Declaration
    void ClearInstallationId()

    SetAccessToken(string)

    Sets the player access token for all apis.

    Declaration
    void SetAccessToken(string accessToken)
    Parameters
    Type Name Description
    string accessToken

    The access token

    SetAnalyticsUserId(string)

    Sets the analytics user id into the headers of the supported services

    Declaration
    void SetAnalyticsUserId(string analyticsUserId)
    Parameters
    Type Name Description
    string analyticsUserId

    The analytics user id

    SetInstallationId(string)

    Sets the installation id into the headers of the supported services

    Declaration
    void SetInstallationId(string installationId)
    Parameters
    Type Name Description
    string installationId

    The installation id

    SignInWithCode(string, SignInWithCodeRequest, string, string, CancellationToken)

    Sign in using a code obtained from requesting a code.

    Declaration
    ApiOperation<AuthenticationResponse> SignInWithCode(string projectId, SignInWithCodeRequest request, string environment = null, string codeLinkSessionId = null, CancellationToken token = default)
    Parameters
    Type Name Description
    string projectId

    The project id

    SignInWithCodeRequest request

    The request options

    string environment

    The environment name

    string codeLinkSessionId

    The code link session id

    CancellationToken token

    The optional cancellation token

    Returns
    Type Description
    ApiOperation<AuthenticationResponse>

    The operation

    SignInWithExternalToken(string, string, SignInWithExternalTokenRequest, string, CancellationToken)

    Sign in using a token obtained from a supported external identity provider.

    Declaration
    ApiOperation<AuthenticationResponse> SignInWithExternalToken(string projectId, string idProvider, SignInWithExternalTokenRequest request, string environment = null, CancellationToken token = default)
    Parameters
    Type Name Description
    string projectId

    The project id

    string idProvider

    The key for the identity provider

    SignInWithExternalTokenRequest request

    The request options

    string environment

    The environment name

    CancellationToken token

    The optional cancellation token

    Returns
    Type Description
    ApiOperation<AuthenticationResponse>

    The operation

    SignInWithSessionToken(string, SignInWithSessionTokenRequest, string, CancellationToken)

    Sign in using a session token

    Declaration
    ApiOperation<AuthenticationResponse> SignInWithSessionToken(string projectId, SignInWithSessionTokenRequest request, string environment = null, CancellationToken token = default)
    Parameters
    Type Name Description
    string projectId

    The project id

    SignInWithSessionTokenRequest request

    The request options

    string environment

    The environment name

    CancellationToken token

    The optional cancellation token

    Returns
    Type Description
    ApiOperation<AuthenticationResponse>

    The operation

    SignInWithUsernamePassword(string, UsernamePasswordRequest, string, CancellationToken)

    Sign in using a username and password

    Declaration
    ApiOperation<AuthenticationResponse> SignInWithUsernamePassword(string projectId, UsernamePasswordRequest request, string environment = null, CancellationToken token = default)
    Parameters
    Type Name Description
    string projectId

    The project id

    UsernamePasswordRequest request

    The request options

    string environment

    The environment name

    CancellationToken token

    The optional cancellation token

    Returns
    Type Description
    ApiOperation<AuthenticationResponse>

    The operation

    SignUpAnonymously(string, string, SignUpAnonymouslyRequest, CancellationToken)

    Create a new anonymous player account

    Declaration
    ApiOperation<AuthenticationResponse> SignUpAnonymously(string projectId, string environment = null, SignUpAnonymouslyRequest request = null, CancellationToken token = default)
    Parameters
    Type Name Description
    string projectId

    The project id

    string environment

    The environment name

    SignUpAnonymouslyRequest request

    The request options

    CancellationToken token

    The optional cancellation token

    Returns
    Type Description
    ApiOperation<AuthenticationResponse>

    The operation

    SignUpWithUsernamePassword(string, UsernamePasswordRequest, string, CancellationToken)

    Sign up using a username and password

    Declaration
    ApiOperation<AuthenticationResponse> SignUpWithUsernamePassword(string projectId, UsernamePasswordRequest request, string environment = null, CancellationToken token = default)
    Parameters
    Type Name Description
    string projectId

    The project id

    UsernamePasswordRequest request

    The request options

    string environment

    The environment name

    CancellationToken token

    The optional cancellation token

    Returns
    Type Description
    ApiOperation<AuthenticationResponse>

    The operation

    Events

    AccessTokenChanged

    Event raised when the access token changed.

    Declaration
    event Action AccessTokenChanged
    Event Type
    Type Description
    Action
    In This Article
    • Properties
      • AccessToken
      • Analytics
      • CloudCode
      • CloudSaveData
      • CloudSaveFiles
      • EconomyConfiguration
      • EconomyCurrencies
      • EconomyInventory
      • EconomyPurchases
      • Leaderboards
      • Lobby
      • PlayerAuthentication
      • PlayerNames
      • QosDiscovery
      • RelayAllocations
      • RemoteConfig
    • Methods
      • ClearAnalyticsUserId()
      • ClearCredentials()
      • ClearInstallationId()
      • SetAccessToken(string)
      • SetAnalyticsUserId(string)
      • SetInstallationId(string)
      • SignInWithCode(string, SignInWithCodeRequest, string, string, CancellationToken)
      • SignInWithExternalToken(string, string, SignInWithExternalTokenRequest, string, CancellationToken)
      • SignInWithSessionToken(string, SignInWithSessionTokenRequest, string, CancellationToken)
      • SignInWithUsernamePassword(string, UsernamePasswordRequest, string, CancellationToken)
      • SignUpAnonymously(string, string, SignUpAnonymouslyRequest, CancellationToken)
      • SignUpWithUsernamePassword(string, UsernamePasswordRequest, string, CancellationToken)
    • Events
      • AccessTokenChanged
    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)