I'm trying to work out a way to obtain the login results from LoginWithCustomID but I can't work out how.
So far I have this function:
PlayFabClientPtr UPlayFabAnalyticsSubsystem::Login() { clientAPI = IPlayFabModuleInterface::Get().GetClientAPI(); PlayFab::ClientModels::FLoginWithCustomIDRequest request; // Setting parameters to the requests so we can actually get an user account with PlayFab request.CustomId = TEXT("GettingStartedGuide"); request.CreateAccount = true; clientAPI->LoginWithCustomID( request, nullptr, PlayFab::FPlayFabErrorDelegate::CreateUObject(this, &UPlayFabAnalyticsSubsystem::OnError)); return clientAPI; }
But when I call
clientAPI->WriteTitleEvent(requestTitleEvent, nullptr, PlayFab::FPlayFabErrorDelegate::CreateUObject(this, &UPlayFabAnalyticsSubsystem::OnError));
I get the "You must log in before calling this function" Error on the first time it's executed, on later executions it works fine. I understand that I could use the SessionTicket from LoginResult but I can't work out how to do it in C++. Could you please help me?
Thanks a lot!