I would like to know if it is possible to send data between clients using PlayFab, if the only thing the sending client has is the receiving clients EntityKey ? This needs to be done without using Party or Groups.
I would like to know if it is possible to send data between clients using PlayFab, if the only thing the sending client has is the receiving clients EntityKey ? This needs to be done without using Party or Groups.
Sending data directly between clients is not supported by playfab, and it needs to go through the server side. Now that you have the EntityKey of the receiving client, you can call the SetObjects API in cloudscript to store the data into its objects and retrieve them later using GetObjects.
Would you mind expanding on SetObjects API in clouldScript ?
Which object to set ? The "title_player_account" entity's objects ?
The objects to set are the "title_player_account" entity's objects.
An example of expanding on the SetObjects API in cloudscript is as follows:
handlers.callEntityAPI=function(args,context){ entity.SetObjects({ Entity: { Id: args.ReceiverEntityId, Type: "title_player_account", TypeString: "title_player_account" }, Objects: [ { ObjectName: "obj", DataObject: args.customData } ] }) }
At this point, the customData passed in by the client is:
"Key": "Data"
The figure below shows the Receiver client entity's objects:
3 People are following this question.