PlayFabAuthenticator.cs
PlayFabAuthenticator.cs
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using Photon.Pun;
using Photon.Realtime;
using PlayFab;
using PlayFab.ClientModels;
using Steamworks;
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.Serialization;
using UnityEngine.UI;
using static System.Net.Mime.MediaTypeNames;
namespace GorillaNetworking
{
public class PlayFabAuthenticator : MonoBehaviour
{
public enum SafetyType
{
None = 0,
Auto = 1,
OptIn = 2
}
[Serializable]
public class CachePlayFabIdRequest
{
public string Platform;
[Serializable]
public class PlayfabAuthRequestData
{
public string CustomId;
[Serializable]
public class PlayfabAuthResponseData
{
public string SessionTicket;
[FormerlySerializedAs("loginDisplayID")]
public string oculusID = "";
protected Callback<GetAuthSessionTicketResponse_t>
m_GetAuthSessionTicketResponse;
StartCoroutine(DisplayGeneralFailureMessageOnGorillaComputerAfter1Frame());
}
}
}
private IEnumerator
DisplayGeneralFailureMessageOnGorillaComputerAfter1Frame()
{
yield return null;
if (gorillaComputer != null)
{
}
else
{
Debug.LogError("PlayFabAuthenticator: gorillaComputer is null, so
could not set GeneralFailureMessage notifying user that the steam account could not
be authenticated.", this);
}
}
GorillaTagger.Instance.offlineVRRig.GetCosmeticsPlayFabCatalogData();
}
}, delegate (PlayFabError error)
{
Debug.Log("Got error retrieving user data:");
Debug.Log(error.GenerateErrorReport());
if (GorillaTagger.Instance != null)
{
GorillaTagger.Instance.offlineVRRig.GetCosmeticsPlayFabCatalogData();
}
});
if (CosmeticsController.instance != null)
{
Debug.Log("initializing cosmetics");
CosmeticsController.instance.Initialize();
}
if (gorillaComputer != null)
{
gorillaComputer.OnConnectedToMasterStuff();
}
else
{
StartCoroutine(ComputerOnConnectedToMaster());
}
if (PhotonNetworkController.Instance != null)
{
NetworkSystem.Instance.SetAuthenticationValues(null);
}
}
gorillaComputer.GeneralFailureMessage(gorillaComputer.unableToConnect);
}
}