Prerequisites
Before you begin, make sure you have the following:- A free PlayFab developer account
- Unity 2018.3 or later (download from unity.com)
- Visual Studio 2017 (Update 15.7) or later with the Game development with Unity workload installed
- Git installed and available on your PATH
The PlayFab Sign-In sample targets Unity 2018.3+. Newer LTS versions of Unity are fully supported.
Step 1: Create a PlayFab title in Game Manager
Every PlayFab integration is scoped to a title. You need a Title ID to connect any sample to the PlayFab backend.Log in to Game Manager
Go to developer.playfab.com and sign in with your PlayFab account.
Create a new studio (first time only)
If this is your first title, Game Manager prompts you to create a Studio. Enter a studio name (for example, your company or team name) and select Create studio.
Create a new title
Inside your studio, select New title. Enter a title name such as
PlayFab Sign-In Sample, then select Create title.Step 2: Clone the repository
Open a terminal
Open a terminal (or Git Bash on Windows) in the directory where you want to store the project.
Step 3: Open the project in Unity
Navigate to the sample folder
Browse to the following path inside the cloned repository and select Open:
Step 4: Configure your Title ID
The sample needs your Title ID to communicate with the PlayFab backend.Open the PlayFabSharedSettings asset
In the Unity Project window, navigate to:Select the file to open it in the Inspector.
Enter your Title ID
In the Inspector, find the Title Id field and paste the Title ID you copied from Game Manager.
You can also set the Title ID using the PlayFab Editor Extensions panel inside Unity. Select PlayFab in the menu bar, then Editor Extensions, and enter your Title ID in the Settings tab.
Step 5: Run the scene
Open the main scene
In the Project window, navigate to
Assets/Scenes and double-click the main scene file to open it.Sign in
The sample presents a sign-in dialog with three options:
- Sign in with email and password — use credentials from an existing PlayFab account linked to your title.
- Create an account — register a new email/password account. The sample silently authenticates via device ID first, then links the email/password to that account.
- Sign in as guest — authenticates silently using the device’s unique identifier via
LoginWithCustomID(on desktop) or the platform-native device ID API (on Android or iOS).
Confirm a successful login
After a successful sign-in, the screen transitions to a post-login view. You can select Clear sign-in to sign out, or Clear remembered login to remove stored credentials.To verify the login server-side, open your title in Game Manager and select Players from the left navigation — the signed-in player should appear in the list.
What to try next
Now that you have a working sign-in flow, explore more complex samples and recipes:PlayFab Sign-In (deep dive)
Full reference for the Sign-In sample, including the auth service architecture and UI wiring.
Space Rumble
A complete mini-game covering leaderboards, CloudScript, and player events on top of authentication.
Progressive Rewards
Reward players for consecutive daily logins using CloudScript and Title Data.
Recipes overview
Browse all drop-in mechanics — prize wheels, referral codes, regenerating currency, and more.
