I'm getting invalid arguments error when trying to use the tutorial login. I am trying to call the login function from another script like so:
GameManager.GetComponent<PlayFabManager> ().Login (650D);
Here is the tutorial code:
using System.Collections; using System.Collections.Generic; using UnityEngine; using PlayFab; using PlayFab.ClientModels; public class PlayFabManager : MonoBehaviour { public string PlayFabId; // Use this for initialization void Start () { PlayFabSettings.TitleId = "650D"; } // Update is called once per frame void Update () { } public void Login(string titleId) { LoginWithCustomIDRequest request = new LoginWithCustomIDRequest() { TitleId = titleId, CreateAccount = true, CustomId = SystemInfo.deviceUniqueIdentifier }; PlayFabClientAPI.LoginWithCustomID(request, (result) => { PlayFabId = result.PlayFabId; Debug.Log("Got PlayFabID: " + PlayFabId); if(result.NewlyCreated) { Debug.Log("(new account)"); } else { Debug.Log("(existing account)"); } }, (error) => { Debug.Log("Error logging in player with custom ID:"); Debug.Log(error.ErrorMessage); }); } }