Installing the PlayFab SDK for Unity
You have two options when installing the PlayFab Unity 3D SDK:
Install the PlayFab Unity Editor Extensions Asset Package. Then use Editor Extension to install the PlayFab Unity 3D SDK and configure your Unity Project.
PlayFab Editor Extensions is a stand-alone Unity plug-in that streamlines getting started with PlayFab.
When a supported SDK is installed, additional service menus are available. These menus provide access to SDK configurations. These configuration settings are saved in a combination of places to ensure that the data persists throughout Unity compilations and deployments. For more information about the PlayFab Editor Extensions, see the readme in the PlayFab/UnityEditorExtensions GitHub repo.
Install the PlayFab Unity 3D SDK directly without using PlayFab Unity Editor Extensions. When you use this installation method, you configure your Unity Project directly by setting properties property values in your code.
This content assumes you that you have a PlayFab developer account and an existing Unity Project.
Install the PlayFab Unity Editor Extensions and the PlayFab SDK
Download the PlayFab Unity Editor Extensions Asset Package.
Open your Unity Project.
Navigate to where you downloaded the file and double-click on the
PlayFabEditorExtensions.UnityPackagefile to open the Import Unity Package dialog in the Unity Editor.
To import the PlayFab Unity Editor Extensions into your project, select Import.
When the import has completed, the PlayFab Unity Editor Extensions panel should open automatically. If you've already created a PlayFab developer account, select the Log In link to log in with your PlayFab username and password.
If the panel did not open, or if you close the panel and want to reopen it, you can do so by selecting Window > PlayFab > Editor Extensions
After logging in, the extension displays the SDK installation dialog.
Select Install PlayFab SDK to automatically import the SDK into your project or upgrade the version that is currently installed.
Set your title settings
Before you can make an API call, you must specify the Title to receive the call in the PlayFab Title Settings. To set the Title:
Select SET MY TITLE in the Editor Extensions.
Select the Studio entry to open the studio drop-down menu. Select the studio that contains the Title to which you would like to connect.
Select the Title ID entry to open a drop-down menu of Titles associated with the selected studio.
Download and install the SDK only
To install the SDK without using the PlayFab Unity Editor Extensions:
- Open your Unity project.
- Download the PlayFab Unity3D SDK Asset Package from the PlayFab GitHub repo.
- Navigate to where you downloaded the file, and double-click on the .UnityPackage file to open the Import Unity Package dialog in the Unity Editor.
- To import the PlayFab Unity3D SDK into your project, select Import.
Setting the Title ID without using the editor extensions
To set the title:
In the Unity Editor Project panel select the Assets folder.
Open the Assets > PlayFabSdk > Shared > Public > Resources folder.
Select the PlayFabSettings Asset.
In the Inspector window, set the Title ID and the Developer Secret Key.