Skip to content

Latest commit

 

History

History
146 lines (115 loc) · 6.76 KB

File metadata and controls

146 lines (115 loc) · 6.76 KB

PlayFab Configuration

Index

Description

This project consists in an Unity Tic-Tac-Toe game with multiplayer support.

Configuration

Pre-requisites

Before configuring this project, first ensure you have completed the next pre-requisites:

Configuration steps

PlayFab settings

The next steps will guide you for doing the PlayFab configuration:

  1. Create a PlayFab account (tutorial), or sing-in into your current account.

  2. Create a new PlayFab Title in your PlayFab account.

  3. Create a Matchmaking queue in your PlayFab Title for the QuickMatch feature:

    1. Open your Title and go to Build/Multiplayer/Matchmaking.
    2. Press the New Queue button.
    3. In the Creation page, enter the following:
      1. Queue Name: TicTacToeQuickMatch.
      2. Match Size: Min = 2; Max = 2.
      3. Rules:
        1. Rule Name: UserSkillRule.
        2. Weight: 1.
        3. Type: select the String Equality Rule option.
        4. Attribute Source: select the User option.
        5. Attribute path: Skill.
        6. Behavior when the attribute is not specified: select the Match with any option.
    4. At the end, you'll have something like this:


  4. Create a Matchmaking queue in your PlayFab Title for the QuickMatch feature:

    1. Open your Title and go to Build/Multiplayer/Matchmaking.
    2. Press the New Queue button.
    3. In the Creation page, enter the following:
      1. Queue Name: PartyQueue.
      2. Match Size: Min = 2; Max = 2.
      3. Rules:
        1. Rule Name: PreviousMatchIdRule.
        2. Weight: 1.
        3. Type: select the String Equality Rule option.
        4. Attribute Source: select the User option.
        5. Attribute path: PreviousMatchId.
        6. Behavior when the attribute is not specified: select the Use default option.
          1. Default value: type Default.
    4. At the end, you'll have something like this:


  5. Configure the project's Azure Functions:

    1. Open your Title and go to Build/Automation/CloudScript/Functions.

    2. Do the following steps for each Azure Functions you use in this project:

      1. Press the Register Function button.
      2. Select the HTTP Trigger Type option.
      3. Enter your Function name.
      4. Enter your Function URL

      NOTE: you can follow this tutorial to get the Function's URL

      1. Press the Register Function button for saving the new function.

Unity Project settings

  1. Install the PlayFab Unity Package:

    1. Open the Tic-Tac-Toe Unity Project.
    2. Navigate to the folder where you have saved the PlayFab Unity Package (it's the .unitypackage file).
    3. Double-click the PlayFab Unity Package.
    4. The next prompt will be shown:


    1. Press the Import button to import these assets into the project.
  2. Configure the Unity project:

    1. First, go to your PlayFab's Title and retrieve your PlayFab's title ID.
    2. Paste the Title ID in this line of the Constants.cs file.
  3. Now, you're able to run the project.