question

52487 avatar image
52487 asked

How to invite friends in to Party in Unity?

Hello.

I want to create a party in Unity with PlayFab Party.

Party SDK is installed.

(https://github.com/PlayFab/PlayFabPartyUnity)

PlayerA will invite PlayerB to the party.

PlayerA created a new party. (PlayFabMultiplayerManager.Get().CreateAndJoinNetwork())

PlayerA received the OnNetworkJoined callback and the networkId. (networkId is string)

Player B needs to know PlayerA's networkId to join the party.(PlayFabMultiplayerManager.Get().JoinNetwork(networkId))

Player B needs to know PlayerA's networkId, but I can't find a suitable way.

What are the ways?

Thank you for reading.

sdksFriends
10 |1200

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

1 Answer

·
Seth Du avatar image
Seth Du answered

We will usually recommend to use SharedGroup of PlayFab to work as a short discussion. Please refer to: Using Shared Group Data.

Players may update the Network ID in SharedGroup Data to notify their friends. Meanwhile, since it can only be passively updated due to PlayFab RESTful nature. You may implement codes that will update Shared Group Data once a while and also add a button to let the player actively refresh the data.

-------

Sorry for the late response, I was discussing with the team about the scenario of informing friends to join the same Shared Group.

To inform friends, we may involve Cloud Script, where function can help create Shared Group. Initiator will send members’ player IDs from the friend list, then Cloud Script will also update target players’ Player (Read-only) data to store Shared Group ID so that the client will check Player Data if they have a new Shared Group once a while and also add another button to let the player actively refresh the data.

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.