This quickstart helps you deploy PlayFab SDK before doing any API call in the Unity engine. Before continuing, make sure you have completed Getting started for developers, which ensures you have a PlayFab account and are familiar with the PlayFab Game Manager.
Download PlayFab SDK
You can also use the Editor Extension package, but as this component only rely on the PlayFab Account Authentication and we want to manage this mechanism with our Corporate Azure AD Account, we will proceed manually.
Install & Setup PlayFab SDK in Unity
- Open Unity Hub and Select Create a new project.
- Select 2D Template and define your Project Name and location.
At this point, you have a blank project with only 1 scene store in your Asset Folder.
Deploy PlayFab SDK
From the Unity editor, go to Assets > Import Package > Custom Package and then select the downloaded PlayFabSDK package.
If you already have an old SDK Version imported, you should delete the folder before to avoid any issue later on
Configure PlayFab SDK
You have to define the Game Title that will host Player Authentication for your game. You will find your Title ID on your Studio page
This can be done on 2 ways :
PlayFabSettings.TitleId = "YourTitleID";somewhere in your code – or
- In your Unity Project tab, navigate to: assets/PlayFabSDK/Shared/Public/Resources and select the PlayFabSharedSettings and fill the Title Id field.
Test your PlayFab SDK
To check the this import have been done well, you can follow