Lobby.AddMember
Method (1 of 2)
Add a local user as a member to the lobby.
public void AddMember(PFEntityKey localUser, IDictionary<string, string> memberProperties)
parameter | description |
---|---|
localUser | The PlayFab Entity Key of the local user to add to the lobby as a member. |
memberProperties | The initial member properties to set for this user when they join the lobby. |
Remarks (1 of 2)
This is an asynchronous operation. Upon successful completion, the title is provided a OnLobbyMemberAdded
event followed by a OnAddMemberCompleted
event with the OnAddMemberCompleted result
field set to Success
. Upon a failed completion, the title is provided a OnAddMemberCompleted
with the OnAddMemberCompleted result
field set to a failed error code.
This method is used to add an extra local PlayFab entity to a pre-existing lobby object. Because the lobby object must have already been created either via a call to CreateAndJoinLobby
or JoinLobby
, this method is primarily useful for multiple local user scenarios.
This is an asynchronous operation. The member added via this method will not be reflected in the lists returned by GetMembers
until the asynchronous operation successfully completes.
Method (2 of 2)
Add a local user as a member to the lobby.
public void AddMember(PlayFabAuthenticationContext localUser,
IDictionary<string, string> memberProperties)
parameter | description |
---|---|
localUser | The PlayFab Entity Key of the local user to add to the lobby as a member. |
memberProperties | The initial member properties to set for this user when they join the lobby. |
Remarks (2 of 2)
This is an asynchronous operation. Upon successful completion, the title is provided a OnLobbyMemberAdded
event followed by a OnAddMemberCompleted
event with the OnAddMemberCompleted result
field set to Success
. Upon a failed completion, the title is provided a OnAddMemberCompleted
with the OnAddMemberCompleted result
field set to a failed error code.
This method is used to add an extra local PlayFab entity to a pre-existing lobby object. Because the lobby object must have already been created either via a call to CreateAndJoinLobby
or JoinLobby
, this method is primarily useful for multiple local user scenarios.
This is an asynchronous operation. The member added via this method will not be reflected in the lists returned by GetMembers
until the asynchronous operation successfully completes.
See Also
- class Lobby
- class PFEntityKey
- namespace PlayFab.Multiplayer
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for