Class EOSLobbyManager
- Namespace
- PlayEveryWare.EpicOnlineServices.Samples
Class EOSLobbyManager is a simplified wrapper for EOS Lobby Interface.
public class EOSLobbyManager : IEOSSubManager
- Inheritance
-
EOSLobbyManager
Constructors
EOSLobbyManager()
public EOSLobbyManager()
Fields
_Dirty
public bool _Dirty
Field Value
customLocalRTCOptions
public LocalRTCOptions? customLocalRTCOptions
Field Value
- LocalRTCOptions?
Methods
AcceptCurrentLobbyInvite(bool, OnLobbyCallback)
If there is a current invite, calls JoinLobby
public void AcceptCurrentLobbyInvite(bool enablePresence, EOSLobbyManager.OnLobbyCallback AcceptLobbyInviteCompleted)
Parameters
enablePresenceboolPresence Enabled if
trueAcceptLobbyInviteCompletedEOSLobbyManager.OnLobbyCallbackCallback when join lobby is completed
AcceptLobbyInvite(LobbyInvite, bool, OnLobbyCallback)
Calls JoinLobby on specified LobbyInvite
public void AcceptLobbyInvite(LobbyInvite lobbyInvite, bool enablePresence, EOSLobbyManager.OnLobbyCallback AcceptLobbyInviteCompleted)
Parameters
lobbyInviteLobbyInviteSpecified invite to accept
enablePresenceboolPresence Enabled if
trueAcceptLobbyInviteCompletedEOSLobbyManager.OnLobbyCallbackCallback when join lobby is completed
AddNotifyLobbyUpdate(Action)
Subscribe to event callback for when the current lobby data has been updated The callback will only run if a listener is subscribed, which is done in SubscribeToLobbyUpdates().
public void AddNotifyLobbyUpdate(Action Callback)
Parameters
CallbackActionCallback to receive notification when lobby data is updated
AddNotifyMemberUpdateReceived(OnMemberUpdateCallback)
Use to access functionality of EOS_Lobby_AddNotifyLobbyMemberUpdateReceived The callback will only run if a listener is subscribed, which is done in SubscribeToLobbyUpdates().
public void AddNotifyMemberUpdateReceived(EOSLobbyManager.OnMemberUpdateCallback Callback)
Parameters
CallbackEOSLobbyManager.OnMemberUpdateCallbackCallback to receive notification when lobby member update is received
CreateLobby(Lobby, OnLobbyCallback)
Wrapper for calling EOS_Lobby_CreateLobby
public void CreateLobby(Lobby lobbyProperties, EOSLobbyManager.OnLobbyCallback CreateLobbyCompleted)
Parameters
lobbyPropertiesLobbyLobby properties used to create new lobby
CreateLobbyCompletedEOSLobbyManager.OnLobbyCallbackCallback when create lobby is completed
DeclineLobbyInvite()
Wrapper for calling EOS_Lobby_RejectInvite
public void DeclineLobbyInvite()
DestroyCurrentLobby(ref OnLobbyCallback)
Wrapper for calling EOS_Lobby_DestroyLobby
public void DestroyCurrentLobby(ref EOSLobbyManager.OnLobbyCallback DestroyCurrentLobbyCompleted)
Parameters
DestroyCurrentLobbyCompletedEOSLobbyManager.OnLobbyCallbackCallback when destroy lobby is completed
EnablePressToTalk(ProductUserId, OnLobbyCallback)
public void EnablePressToTalk(ProductUserId targetUserId, EOSLobbyManager.OnLobbyCallback EnablePressToTalkCompleted)
Parameters
targetUserIdProductUserIdEnablePressToTalkCompletedEOSLobbyManager.OnLobbyCallback
GetCurrentInvite()
public LobbyInvite GetCurrentInvite()
Returns
GetCurrentLobby()
public Lobby GetCurrentLobby()
Returns
GetCurrentSearch()
public LobbySearch GetCurrentSearch()
Returns
- LobbySearch
GetInvites()
public Dictionary<ProductUserId, LobbyInvite> GetInvites()
Returns
- Dictionary<ProductUserId, LobbyInvite>
GetSearchResults()
public Dictionary<Lobby, LobbyDetails> GetSearchResults()
Returns
- Dictionary<Lobby, LobbyDetails>
JoinLobby(string, LobbyDetails, bool, OnLobbyCallback)
Wrapper for calling EOS_Lobby_JoinLobby
public void JoinLobby(string lobbyId, LobbyDetails lobbyDetails, bool presenceEnabled, EOSLobbyManager.OnLobbyCallback JoinLobbyCompleted)
Parameters
lobbyIdstringTarget lobbyId of lobby to join
lobbyDetailsLobbyDetailsReference to
LobbyDetailsof lobby to joinpresenceEnabledboolPresence Enabled if
trueJoinLobbyCompletedEOSLobbyManager.OnLobbyCallbackCallback when join lobby is completed
KickMember(ProductUserId, OnLobbyCallback)
Wrapper for calling EOS_Lobby_KickMember
public void KickMember(ProductUserId productUserId, EOSLobbyManager.OnLobbyCallback KickMemberCompleted)
Parameters
productUserIdProductUserIdTarget
ProductUserIdto kick from current lobbyKickMemberCompletedEOSLobbyManager.OnLobbyCallbackCallback when kick member is completed
LeaveLobby(OnLobbyCallback)
Wrapper for calling EOS_Lobby_LeaveLobby
public void LeaveLobby(EOSLobbyManager.OnLobbyCallback LeaveLobbyCompleted)
Parameters
LeaveLobbyCompletedEOSLobbyManager.OnLobbyCallbackCallback when leave lobby is completed
ModifyLobby(Lobby, OnLobbyCallback)
Wrapper for calling EOS_Lobby_UpdateLobby
public void ModifyLobby(Lobby lobbyUpdates, EOSLobbyManager.OnLobbyCallback ModififyLobbyCompleted)
Parameters
lobbyUpdatesLobbyLobby properties used to update current lobby
ModififyLobbyCompletedEOSLobbyManager.OnLobbyCallbackCallback when modify lobby is completed
OnLobbyChanged(LobbyChangeEventArgs)
protected virtual void OnLobbyChanged(EOSLobbyManager.LobbyChangeEventArgs args)
Parameters
OnLoggedIn()
User Logged In actions
public void OnLoggedIn()
OnLoggedOut()
User Logged Out actions
public void OnLoggedOut()
PressToTalk(KeyCode, OnLobbyCallback)
public void PressToTalk(KeyCode PTTKeyCode, EOSLobbyManager.OnLobbyCallback TogglePressToTalkCompleted)
Parameters
PTTKeyCodeKeyCodeTogglePressToTalkCompletedEOSLobbyManager.OnLobbyCallback
PromoteMember(ProductUserId, OnLobbyCallback)
Wrapper for calling EOS_Lobby_PromoteMember
public void PromoteMember(ProductUserId productUserId, EOSLobbyManager.OnLobbyCallback PromoteMemberCompleted)
Parameters
productUserIdProductUserIdTarget
ProductUserIdto promotePromoteMemberCompletedEOSLobbyManager.OnLobbyCallbackCallback when promote member is completed
RemoveNotifyLobbyUpdate(Action)
public void RemoveNotifyLobbyUpdate(Action Callback)
Parameters
CallbackAction
RemoveNotifyMemberUpdate(OnMemberUpdateCallback)
public void RemoveNotifyMemberUpdate(EOSLobbyManager.OnMemberUpdateCallback Callback)
Parameters
CallbackEOSLobbyManager.OnMemberUpdateCallback
SearchByAttribute(string, string, OnLobbySearchCallback)
Wrapper for calling EOS_LobbySearch_Find
public void SearchByAttribute(string attributeKey, string attributeValue, EOSLobbyManager.OnLobbySearchCallback SearchCompleted)
Parameters
attributeKeystringstringof attributeKey to searchattributeValuestringstringof attributeValue to searchSearchCompletedEOSLobbyManager.OnLobbySearchCallbackCallback when search is completed
SearchByLobbyId(string, OnLobbySearchCallback)
Wrapper for calling EOS_LobbySearch_Find
public void SearchByLobbyId(string lobbyId, EOSLobbyManager.OnLobbySearchCallback SearchCompleted)
Parameters
lobbyIdstringstringof lobbyId to searchSearchCompletedEOSLobbyManager.OnLobbySearchCallbackCallback when search is completed
SendInvite(ProductUserId)
Wrapper for calling EOS_Lobby_SendInvite
public void SendInvite(ProductUserId targetUserId)
Parameters
targetUserIdProductUserIdTarget
ProductUserIdto send invite
SetLocalMemberDeafen(bool, OnLobbyCallback)
Sets the Deafen Status of the Local Member.
If shouldBeDefeaned is true, then the user won't be able to hear other users.
public void SetLocalMemberDeafen(bool shouldBeDefeaned, EOSLobbyManager.OnLobbyCallback DeafenCompleted)
Parameters
shouldBeDefeanedboolIf true, the local user should become defeaned. Otherwise, undeafen the user.
DeafenCompletedEOSLobbyManager.OnLobbyCallbackCallback when DeafenLocalMember is completed
SetLocalMemberMute(bool, OnLobbyCallback)
Set the Mute Status of the Local Member.
The local user sets their mute status to micOn,
either becoming muted or unmuting themself.
While muted, other users in the lobby will not be able to hear the local user.
public void SetLocalMemberMute(bool shouldSelfBeMuted, EOSLobbyManager.OnLobbyCallback MuteLocalMemberCompleted)
Parameters
shouldSelfBeMutedboolIf true, the local user mutes themself, and no longer sends audio. If false, the local user unmutes themself.
MuteLocalMemberCompletedEOSLobbyManager.OnLobbyCallbackCallback when MuteLocalMember is completed
SetMemberAttribute(LobbyAttribute)
Wrapper for calling EOS_LobbyModification_AddMemberAttribute
public void SetMemberAttribute(LobbyAttribute memberAttribute)
Parameters
memberAttributeLobbyAttributeLobbyAttributeto be added to the current lobby
SetMemberMuteStatus(bool, ProductUserId, OnLobbyCallback)
public void SetMemberMuteStatus(bool shouldUserBeMuted, ProductUserId targetProductUserId, EOSLobbyManager.OnLobbyCallback MuteMemberCompleted)
Parameters
shouldUserBeMutedbooltargetProductUserIdProductUserIdMuteMemberCompletedEOSLobbyManager.OnLobbyCallback
ToggleMute(ProductUserId, OnLobbyCallback)
Wrapper for calling EOS_RTCAudio_UpdateReceiving
This attempts to locate a user with id targetUserId inside the CurrentLobby.
If CurrentLobby has populated its Members list,
the local user's current mute setting is reversed, and then applied.
If the Members list isn't available, this action will attempt to mute the target.
If the local user has another user in the Lobby muted, the local user won't hear the muted user, but other members may still be able to.
If the local user mutes themself, other users won't be able to hear the local user.
public void ToggleMute(ProductUserId targetUserId, EOSLobbyManager.OnLobbyCallback ToggleMuteCompleted)
Parameters
targetUserIdProductUserIdTarget
ProductUserIdto mute or unmuteToggleMuteCompletedEOSLobbyManager.OnLobbyCallbackCallback when toggle mute is completed
UpdateBlockStatusForRTCParticipant(ProductUserId, bool, OnLobbyCallback)
Blocks the Local Lobby Member from receiving/sending audio from/to a Target Lobby Member. Only affects this Local Member. Does not affect other Lobby Members.
public void UpdateBlockStatusForRTCParticipant(ProductUserId targetUserId, bool status, EOSLobbyManager.OnLobbyCallback blockRTCParticipantComplete)
Parameters
targetUserIdProductUserIdThe Target Member's ProductUserID
statusboolTo block or to unblock? True to Block, False to Unblock
blockRTCParticipantCompleteEOSLobbyManager.OnLobbyCallbackCallback when BlockTargetRTCParticipant is completed
Events
LobbyChanged
public event EOSLobbyManager.LobbyChangeEventHandler LobbyChanged