question

Robyn To avatar image
Robyn To asked

UE4 UpdateConnectedPlayers has no ID field

The Unreal Playfab GSDK has an "Update Connected Player" bp node, but the ConnectedPlayer struct has no accessible ID field.

Is this known or am I misunderstanding how I am supposed to update a server's connected PlayerIds?

Do I have to do this in c++? On GetServerDetails I am getting empty PlayerIds with no way to set through BPs.

sdksmultiplayer
10 |1200

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

Dimitris-Ilias Gkanatsios avatar image
Dimitris-Ilias Gkanatsios answered

(not a C++ expert) isn't this field visible in your code? gsdk/ConnectedPlayer.h at main PlayFab/gsdk (github.com)

2 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.

Robyn To avatar image Robyn To commented ·

it is not in blueprints, though I expect it should be based on that file

0 Likes 0 ·
Made Wang avatar image Made Wang Robyn To commented ·

In my tests it worked fine, have you tried updating to the latest GSDK.

0 Likes 0 ·
sample.png (24.0 KiB)
Kaan Öztüzün avatar image
Kaan Öztüzün answered

I am unable to "Make Connected Player" or "Break Connected Player" with the Player Id variable. I need to expose this Player Id variable to make it an array so this "Make" node needs input as Player Id like this:

5443-updateconnectedplayers.png

To achieve this; in "Plugins\PlayFabGSDK\Source\PlayfabGSDK\Public\ConnectedPlayer.h"

I added

  FString PlayerId; 

to above of

 USTRUCT(BlueprintType)

Lastly, I changed UPROPERTY's specifier to "EditAnywhere, BlueprintReadWrite"

After this, I compiled the project and it worked. I am not available to see each player's ID on the session(I am not sure about that can we see the player IDs on the session info) but it gives me the total players in the correct way.

Unfortunately, I am not experienced in C++ so I don't know if is this a real fix or not. I just created a PR on GitHub. https://github.com/PlayFab/gsdk/pull/141


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.