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
enablePresence
boolPresence Enabled if
true
AcceptLobbyInviteCompleted
EOSLobbyManager.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
lobbyInvite
LobbyInviteSpecified invite to accept
enablePresence
boolPresence Enabled if
true
AcceptLobbyInviteCompleted
EOSLobbyManager.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
Callback
ActionCallback 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
Callback
EOSLobbyManager.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
lobbyProperties
LobbyLobby properties used to create new lobby
CreateLobbyCompleted
EOSLobbyManager.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
DestroyCurrentLobbyCompleted
EOSLobbyManager.OnLobbyCallbackCallback when destroy lobby is completed
EnablePressToTalk(ProductUserId, OnLobbyCallback)
public void EnablePressToTalk(ProductUserId targetUserId, EOSLobbyManager.OnLobbyCallback EnablePressToTalkCompleted)
Parameters
targetUserId
ProductUserIdEnablePressToTalkCompleted
EOSLobbyManager.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
lobbyId
stringTarget lobbyId of lobby to join
lobbyDetails
LobbyDetailsReference to
LobbyDetails
of lobby to joinpresenceEnabled
boolPresence Enabled if
true
JoinLobbyCompleted
EOSLobbyManager.OnLobbyCallbackCallback when join lobby is completed
KickMember(ProductUserId, OnLobbyCallback)
Wrapper for calling EOS_Lobby_KickMember
public void KickMember(ProductUserId productUserId, EOSLobbyManager.OnLobbyCallback KickMemberCompleted)
Parameters
productUserId
ProductUserIdTarget
ProductUserId
to kick from current lobbyKickMemberCompleted
EOSLobbyManager.OnLobbyCallbackCallback when kick member is completed
LeaveLobby(OnLobbyCallback)
Wrapper for calling EOS_Lobby_LeaveLobby
public void LeaveLobby(EOSLobbyManager.OnLobbyCallback LeaveLobbyCompleted)
Parameters
LeaveLobbyCompleted
EOSLobbyManager.OnLobbyCallbackCallback when leave lobby is completed
ModifyLobby(Lobby, OnLobbyCallback)
Wrapper for calling EOS_Lobby_UpdateLobby
public void ModifyLobby(Lobby lobbyUpdates, EOSLobbyManager.OnLobbyCallback ModififyLobbyCompleted)
Parameters
lobbyUpdates
LobbyLobby properties used to update current lobby
ModififyLobbyCompleted
EOSLobbyManager.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
PTTKeyCode
KeyCodeTogglePressToTalkCompleted
EOSLobbyManager.OnLobbyCallback
PromoteMember(ProductUserId, OnLobbyCallback)
Wrapper for calling EOS_Lobby_PromoteMember
public void PromoteMember(ProductUserId productUserId, EOSLobbyManager.OnLobbyCallback PromoteMemberCompleted)
Parameters
productUserId
ProductUserIdTarget
ProductUserId
to promotePromoteMemberCompleted
EOSLobbyManager.OnLobbyCallbackCallback when promote member is completed
RemoveNotifyLobbyUpdate(Action)
public void RemoveNotifyLobbyUpdate(Action Callback)
Parameters
Callback
Action
RemoveNotifyMemberUpdate(OnMemberUpdateCallback)
public void RemoveNotifyMemberUpdate(EOSLobbyManager.OnMemberUpdateCallback Callback)
Parameters
Callback
EOSLobbyManager.OnMemberUpdateCallback
SearchByAttribute(string, string, OnLobbySearchCallback)
Wrapper for calling EOS_LobbySearch_Find
public void SearchByAttribute(string attributeKey, string attributeValue, EOSLobbyManager.OnLobbySearchCallback SearchCompleted)
Parameters
attributeKey
stringstring
of attributeKey to searchattributeValue
stringstring
of attributeValue to searchSearchCompleted
EOSLobbyManager.OnLobbySearchCallbackCallback when search is completed
SearchByLobbyId(string, OnLobbySearchCallback)
Wrapper for calling EOS_LobbySearch_Find
public void SearchByLobbyId(string lobbyId, EOSLobbyManager.OnLobbySearchCallback SearchCompleted)
Parameters
lobbyId
stringstring
of lobbyId to searchSearchCompleted
EOSLobbyManager.OnLobbySearchCallbackCallback when search is completed
SendInvite(ProductUserId)
Wrapper for calling EOS_Lobby_SendInvite
public void SendInvite(ProductUserId targetUserId)
Parameters
targetUserId
ProductUserIdTarget
ProductUserId
to 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
shouldBeDefeaned
boolIf true, the local user should become defeaned. Otherwise, undeafen the user.
DeafenCompleted
EOSLobbyManager.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
shouldSelfBeMuted
boolIf true, the local user mutes themself, and no longer sends audio. If false, the local user unmutes themself.
MuteLocalMemberCompleted
EOSLobbyManager.OnLobbyCallbackCallback when MuteLocalMember is completed
SetMemberAttribute(LobbyAttribute)
Wrapper for calling EOS_LobbyModification_AddMemberAttribute
public void SetMemberAttribute(LobbyAttribute memberAttribute)
Parameters
memberAttribute
LobbyAttributeLobbyAttribute
to be added to the current lobby
SetMemberMuteStatus(bool, ProductUserId, OnLobbyCallback)
public void SetMemberMuteStatus(bool shouldUserBeMuted, ProductUserId targetProductUserId, EOSLobbyManager.OnLobbyCallback MuteMemberCompleted)
Parameters
shouldUserBeMuted
booltargetProductUserId
ProductUserIdMuteMemberCompleted
EOSLobbyManager.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
targetUserId
ProductUserIdTarget
ProductUserId
to mute or unmuteToggleMuteCompleted
EOSLobbyManager.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
targetUserId
ProductUserIdThe Target Member's ProductUserID
status
boolTo block or to unblock? True to Block, False to Unblock
blockRTCParticipantComplete
EOSLobbyManager.OnLobbyCallbackCallback when BlockTargetRTCParticipant is completed
Events
LobbyChanged
public event EOSLobbyManager.LobbyChangeEventHandler LobbyChanged