question

YuKim avatar image
YuKim asked

I make a login system

i regist account playfab in unity

but account is not visible web site

using System;
using PlayFab;
using PlayFab.ClientModels;
using UnityEngine;


public class PlayFabLogin : MonoBehaviour
{
    private string userEmail="jin222@naver.com";
    private string userPassword = "9876543";
    private string userName = "Nobbb";


    public void Start()
    {
        Debug.Log(string.IsNullOrEmpty(PlayFabSettings.TitleId));
        //Note: Setting title Id here can be skipped if you have set the value in Editor Extensions already.
        if (!string.IsNullOrEmpty(PlayFabSettings.TitleId))
        {
            PlayFabSettings.TitleId = "144"; // Please change this value to your own titleId from PlayFab Game Manager
            
        }
        RegistNow();


        //var request = new LoginWithCustomIDRequest { CustomId = "GettingStartedGuide", CreateAccount = true };
        //PlayFabClientAPI.LoginWithCustomID(request, OnLoginSuccess, OnLoginFailure);


    }
    void OnRegistSucees(RegisterPlayFabUserResult result)
    {
        Debug.Log("Congratulations, you made your first successful API call!");
    }


    void RegistNow()
    {
        RegisterPlayFabUserRequest registRequest = new RegisterPlayFabUserRequest
        {
            Email = userEmail,
            Password = userPassword,
            Username = userName
        };
        PlayFabClientAPI.RegisterPlayFabUser(registRequest, OnRegistSucees, OnRegistFailed);
        OnClickLogin();
        OnClickAddLogin();
    }
    public void OnClickAddLogin()
    {
        var addLoginRequest = new AddUsernamePasswordRequest { Email = userEmail, Password = userPassword, Username = userName };
        PlayFabClientAPI.AddUsernamePassword(addLoginRequest, OnAddLoginSuccess, OnRegisterFailure);
    }
    private void OnAddLoginSuccess(AddUsernamePasswordResult result)
    {
        Debug.Log("Congratulations, you made your first successful API call!");
        PlayerPrefs.SetString("EMAIL", userEmail);
        PlayerPrefs.SetString("PASSWORD", userPassword);
       
    }


    private void OnRegisterFailure(PlayFabError error)
    {
        Debug.LogError(error.GenerateErrorReport());
    }


    void OnRegistFailed(PlayFabError result)
    {
        Debug.LogError(result.GenerateErrorReport());
    }


    private void OnLoginSuccess(LoginResult result)
    {
        Debug.Log("Congratulations, you made your first successful API call!");
    }


    private void OnLoginFailure(PlayFabError error)
    {
        Debug.LogWarning("Something went wrong with your first API call.  :(");
        Debug.LogError("Here's some debug information:");
        Debug.LogError(error.GenerateErrorReport());
    }
    public void GetUserEmail(string Emailin)
    {
        userEmail = Emailin;
    }


    public void GetUserPassword(string Passwordin)
    {
        userPassword = Passwordin;
    }


    public void OnClickLogin()
    {
        var request = new LoginWithEmailAddressRequest { Email = userEmail, Password = userPassword};
        PlayFabClientAPI.LoginWithEmailAddress(request, OnLoginSuccess, OnLoginFailure);
    }


}

Debug.log is succes

but web site players not add;

404ABFDA5AB7D90E player is created new player

unity3d
캡처.png (24.5 KiB)
캡처2.png (108.8 KiB)
6 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Seth Du avatar image Seth Du ♦ commented ·

Can you search for it? Sometimes there will be delay on the game manager. Additionally, you may navigate to [Game Manager] -> [Dashboard]- >[PlayStream Monitor] to check the events

0 Likes 0 ·
YuKim avatar image YuKim Seth Du ♦ commented ·

i reigsted 2day ago many account but account isn't add playertap

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ YuKim commented ·

If you have received on success callback from login/register related API, the player should be created, as you can also check the events if there are similar ones:

There can be a display issue and just use the search bar to look for it.

0 Likes 0 ·
Show more comments
Seth Du avatar image Seth Du ♦ commented ·

We have checked your title and there is only one player creating event, which creates player 404ABFDA5AB7D90E.

I don't see any issue in your title.

I noticed that you are using hard-coded identification to register user, and you need to provide different email address and username to create other players. Otherwise, error messages like "EmailAddressNotAvailable" will show.

If you click into 404ABFDA5AB7D90E, you can see the button field "master player account", where username and login email are stored.

0 Likes 0 ·
YuKim avatar image YuKim Seth Du ♦ commented ·

404ABFDA5AB7D90E is created newplayer button I change ID and email to create account

but website display only one account

0 Likes 0 ·
Seth Du avatar image
Seth Du answered

We highly suggest you using some RESTful API testing tools like POSTMAN to test PlayFab API. Please see https://api.playfab.com/sdks/postman

I am confused of what you have described. Make sure you are using the correct Title ID. Try to change identification and make another call and see what happened in the PlayStream Monitor. Feel free to attach process screenshots so that we can help.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

YuKim avatar image
YuKim answered

thank you for answering

I saved Title Id in playfabsetting but Title id is intialized in script .......

hahaha

i'm sorry

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.