question

Justin Heasman avatar image
Justin Heasman asked

GetSharedGroupData Question

I am using the shared group data for things like Group Name, Description, etc.  I want to use GetSharedGroupData to share this with all players in the group, which works fine.  I also want to display the players inside this group, but the call to GetSharedGroupData only returns the PlayFabID's and no names or other information.  Is there any other way I can make the player names returned without looping a call to get the individual names one by one?

I hope this makes sense.

Justin

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

You'd need to write that data into the group itself - and really, that's what we'd recommend for most shared group usage, since using Add to attach the player to the group gives that client read/write access to the group, so a hacked client could technically write anything it wanted to.

10 |1200

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

Justin Heasman avatar image
Justin Heasman answered

So write say a JSON of all player names into a key field in the shared group data?  Then use Cloud Script to return the names if required?

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

Correct - store the info on the players in the shared group. Though, if you'll be updating it each time any player writes to it, the thing to do would be to have each player write to a separate key, using their PlayFab ID as part of the Key - that way, they can't stomp on each others' writes.

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.