User Parameters

You can also retrieve various information about the player and their device.

Device Type

Determine the type of device (mobile, tablet, desktop, tv) the game is being played on to adjust the game’s interface and performance settings.

Bridge.device.type

Returns the type of device the user launched the game from. Possible values: Mobile, Tablet, Desktop, TV.

Authorization Support

Check if the platform supports player authorization to enable features that require user authentication, such as saving game progress or accessing social features.

// Possible values: true, false
Bridge.player.isAuthorizationSupported

Is the Player Currently Authorized

Verify if the player is currently authorized on the platform. This allows you to enable personalized features, such as saving high scores or providing user-specific content.

// Possible values: true, false
Bridge.player.isAuthorized

Player ID

Get the player’s unique ID on the platform to manage user-specific data and settings. Use this ID to track player progress, achievements, and purchases

Bridge.player.id

If the platform supports authorization and the player is currently authorized, this returns their platform ID. Otherwise, it returns null.

Player Name

Retrieve the player's name to personalize the game experience. Display the name in leaderboards, friend lists, or when sending notifications and messages.

Bridge.player.name

If there is no data – null. If the data is available, the data is in string format.

Player Photos

Get the count of player avatars available. Use this to manage and display user profile images effectively, such as showing the avatar in multiplayer lobbies or profile screens.

Bridge.player.photos

Possible values: an array of player avatars (sorted by increasing resolution), empty array.

Player Authorization

Authorize the player on the platform to access protected features and personalize the game experience. For example, prompting the player to log in to save their progress or unlock social sharing features.

private void Start()
{
    var options = new Dictionary<string, object>();

    switch (Bridge.platform.id)
    {
        case "yandex":
            options.Add("scopes", true);
            break;
    }

    Bridge.player.Authorize(options, OnAuthorizePlayerCompleted);
}

private void OnAuthorizePlayerCompleted(bool success)
{
    if (success)
    {
        // Player successfully authorized
    }
    else
    {
        // Error, something went wrong
    }
}

Last updated