Skip to content

Commit

Permalink
Getting started project & Update to the Authentication Series project…
Browse files Browse the repository at this point in the history
… for Google Login.
  • Loading branch information
MarcoWilliamsPF committed Nov 29, 2017
1 parent f57e9eb commit 0e409b3
Show file tree
Hide file tree
Showing 883 changed files with 97,310 additions and 28 deletions.
35 changes: 35 additions & 0 deletions VideoTutorialSamples/GettingStarted/Assets/GettingStarted.cs
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 VideoTutorialSamples/GettingStarted/Assets/GettingStarted.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0e409b3

Please sign in to comment.