question

Kain avatar image
Kain asked

UE4 BP SDK issue with multiplayer PIE

When testing multiplayer in PIE (Play in Editor), I noticed that some of the API calls would error in ways that did not make sense. And these errors would not happen in single player testing.

I tracked this down to the use of the static singleton within

void UPlayFabClientAPI::Activate()
{
    IPlayFab* pfSettings = &(IPlayFab::Get());

UE4 has a strange habit of having each editor-spawned client share a process. Due to the use of this singleton, each client was sharing the same PlayFab session ticket, among other things. Easy fix on our side, thanks to provided source code, but I figure I'd point this out.

sdks
10 |1200

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

brendan avatar image
brendan answered

Thanks! If you want to submit your change in the GitHub repo, feel free - we'll open a bug on this though, to get it fixed either way.

10 |1200

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

Kain avatar image
Kain answered

I think Paul is working with Montana Tusk to make a better thing, anyway.The fix was simple, but my version also took away BP functionality, as we don't ever want to expose PlayFab calls to non-programmers.

So our version of UPlayFabClientAPI inherits from UObject instead of UOnlineBlueprintCallProxyBase, and UPlayFabClientAPI::Activate() was replaced with UPlayFabClientAPI::PostRequest(FString const& sessionTicket).

And that sessionTicket parameter was saved by the receiver of the Login result and passed in to every call to PostRequest.

The SessionTicket property was removed from class IPlayFab.

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.