Upgrade 1.8 -> 2.0

Obsolete: MatchmakerClient

Starting from 2.0, the old MatchmakerClient cloud service has been marked as obsolete. Lobbiesarrow-up-right should be used for matchmaking instead.

Cloud Service Accessor Migration

Accessors for some cloud services were migrated from CloudService.GameServices directly to the root of CloudService.

Additionally, LobbiesService can now be accessed directly from the CloudService root as well, instead of being found under CloudService.Rooms.

This should help make your code shorter and make it easier to find all the different cloud services.

async void Start()
{
    PlayerAccount playerAccount = await PlayerAccount.GetMainAsync();

    //var lobbies = playerAccount.Services.Rooms.LobbyService; // <- old
    var lobbies = playerAccount.Services.Lobbies;              // <- new

    var lobbySessions = await lobbies.GetLobbySessionsAsync();
    Debug.Log($"You are currently in {lobbySessions.Count} lobbies.");

    //var cloudStorage = playerAccount.Services.GameServices.CloudStorage; // <- old
    var cloudStorage = playerAccount.Services.CloudStorage;                // <- new

    var storageId = (playerAccount.Id.ToString(), "Friends");
    string[] friends = await cloudStorage.LoadObjectAsync<string[]>(storageId);
    Debug.Log($"You have {friends.Length} friends: {string.Join(", ", friends)}.");
}

CloudService.Regions

Functionality related to regions was relocated from CloudService.Rooms to CloudService.Regions.

This makes more sense when using regions without rooms, such as when working with worlds.

Lobby Creation

Some changes were made to the Lobby creation process, to clearly distinguish between Lobbies that are associated with a particular Room, and Lobbies that are not associated with any Room (Lobbies for interroom communication).

For Room

The new CreateLobbyOptions.ForRoom method can be used to initialize new instances of lobby creation options that should be associated with a particular room:

Not For Room

To create a lobby that is not associated with any particular room, use the CreateLobbyOptions's constructor instead:

CreateLobbyOptions.Secret → Password

The Secret property on the CreateLobbyOptions type has been marked as obsolete, and replaced by a Password property.

This was done to avoid potential confusion between a room secret and a lobby password, which are two separate things.

RefreshRegions → RefreshRegionsInfo

The regions API now returns not only a list regions but also a list of ping servers for use with the new Ping Client. Following functions have been renamed:

Was this helpful?