-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Getting started project & Update to the Authentication Series project…
… for Google Login.
- Loading branch information
1 parent
f57e9eb
commit 0e409b3
Showing
883 changed files
with
97,310 additions
and
28 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
VideoTutorialSamples/GettingStarted/Assets/GettingStarted.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using PlayFab; | ||
using PlayFab.ClientModels; | ||
using System; | ||
|
||
public class GettingStarted : MonoBehaviour { | ||
|
||
// Use this for initialization | ||
void Start () { | ||
|
||
var request = new LoginWithCustomIDRequest() | ||
{ | ||
TitleId = PlayFabSettings.TitleId, | ||
CustomId = SystemInfo.deviceUniqueIdentifier, | ||
CreateAccount = true | ||
}; | ||
|
||
PlayFabClientAPI.LoginWithCustomID(request, OnLoginSuccess, OnLoginError); | ||
|
||
} | ||
|
||
private void OnLoginSuccess(LoginResult result) | ||
{ | ||
Debug.LogFormat("Login Success: {0}", result.PlayFabId); | ||
Debug.LogFormat("Session: {0}", result.SessionTicket); | ||
} | ||
|
||
private void OnLoginError(PlayFabError error) | ||
{ | ||
Debug.Log(error.GenerateErrorReport()); | ||
} | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
VideoTutorialSamples/GettingStarted/Assets/GettingStarted.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
VideoTutorialSamples/GettingStarted/Assets/PlayFabEditorExtensions.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
VideoTutorialSamples/GettingStarted/Assets/PlayFabEditorExtensions/Editor.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.