Click or drag to resize

GameLiftManagerLobbyManager Class

Internal class that is used to connect users to each other
Inheritance Hierarchy
SystemObject
  ASLGameLiftManagerLobbyManager

Namespace:  ASL
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
private class LobbyManager

The GameLiftManagerLobbyManager type exposes the following members.

Constructors
  NameDescription
Public methodGameLiftManagerLobbyManager
Initializes a new instance of the GameLiftManagerLobbyManager class
Top
Properties
  NameDescription
Public propertym_SceneName
The scene to load after every player readies up
Top
Methods
  NameDescription
Private methodActionConnectToServer
Connects this user to a GameLift sever
Private methodAddErrorText
Adds text to the error text, allowing the user to know if an error occurred during connection
Public methodAddPlayerToMatch
Adds a player to the match
Private methodAddPotentialSession
Adds a potential game session to the available session screen as a button to select and thus join with
Public methodAllowReadyUp
Allows users to ready up
Private methodAutoConnect
When the servers are down, this function will ping them every 30 seconds until a connection can occur.
Private methodChangeInteractablility
Allows a button's interactability to be changed on the main Unity thread
Private methodCheckPorts
Looks for an available port for the android device to use by attempting a connection to it
Private methodCheckUsernameAvailability
Checks if the username the user entered is currently being used by another user. If it is - then they are prompted to enter a different username. If not, they can then host or find a session to join.
Private methodChooseToFindSessions
Sets the UI panel to the available sessions screen, destroys any old matches found, and searches for new matches
Private methodChooseToHostSession
Sets the UI panel to the HostMenu screen
Private methodConnectToServer
Connects to a GameLift server
Private methodDestroyMatchOptions
Destroys any match options locally so that they are not repeated to the user
Private methodFindAvailableUDPPort
Finds an available UDP port on the user's end to receive UDP messages on. It should be noted that this function cannot be called on Android, and therefore, only 1 port is available on Android, the default UDP port of 33400. If this port is not available, then that Android device will not be able to receive UDP messages, which ASL does not currently send anyways.
Private methodGetAvailableScenes
Gets the available scenes that the user can host. Due to limitations on Unity's end, this function is only useful if it is being called inside the editor. In order to see your scene when running an EXE version, you must edit the AvailableScenes dropdown menu to include (or exclude) the scenes you want.
Public methodGoBack
Goes back to the last UI screen and cleans anything up that may have happened on the current UI screen
Private methodHostSession
Triggers the HostLambda function, allowing a user to host a game session
Private methodInitilizeUIElements
Initializes all of the UI elements that will be used in the lobby scene
Private methodInvokeHostLambda
Hosts a game via a lambda function for the user
Private methodInvokeJoinSessionLambda
Invokes the join session lambda function that allows this user to a join a selected game session
Private methodInvokeLockSessionLambda
Invokes the lambda function that locks the game session
Private methodInvokeQuickConnectLambda
Invokes the QuickConnect lambda function which looks for a game, if none found, then creates a game for the user. Allowing them to bypass the host/search for game method
Private methodInvokeSearchForSessionsLambda
Invokes the lambda function that searches for available game sessions
Private methodInvokeUsernameLambda
Checks if the username the user entered is currently in any game sessions and if so, does not allow that username to be used again. By default, this lambda function will also set the desired active instances of the fleet being used to 1. It will do this regardless if the instance is already at 1 or if its at 0. This is because after no users after 30 minutes, the instance auto scales down to 0.
Public methodJoinSelectedMatch
Join the currently selected match
Private methodJoinSession
Joins a game session
Public methodLockSession
Locks the game session, preventing any other users from joining it
Public methodPlayerJoinedMatch
Is called when a player joins the match
Private methodQuickConnectMatch
Reduces the number of screens a user has to go through in order to connect to a match
Private methodReadyUp
Indicates that the user is ready for the first scene to being loading
Private methodRemoveErrorText
Clears any error text
Public methodReset
Private methodSearchForSessions
Triggers the search for available game sessions lambda function
Private methodSeePreviousUIScreen
Returns to the previous UI screen, triggered by hitting the back button
Private methodSetCorrectUIPanel
Sets the UI panel to be displayed to the user
Private methodSetGameName
Sets the game name to be displayed to users
Private methodSetQuickConnectFlag
Changes the value of the QuickConnect flag
Public methodStart
This function starts the scene by assigning all UI elements and is manually called by GameLiftManager's Start function as this class is not a MonoBehavior class and can't be.
Private methodStartAutoConnect
Used to start the auto connect coroutine
Public methodUpdateChatLog
Updates the chat log based on the message received
Private methodUpdateConnectionStatusText
Updates the connection status text based on the current connection status
Public methodUpdateLobbyScreen
Updates the lobby screen to show any new players
Private methodUpdateNewComer
Is called to update any new comers of who this user is
Private methodUpdateOtherUsers
Updates other users of this user's presence in the lobby
Private methodUpdateUsername
Updates the username of the user based on the username they selected
Top
Fields
  NameDescription
Private fieldStatic memberDEFAULT_UDP_PORT
The default UDP port number to receive messages on
Private fieldm_AndroidOrOSXUDPListeningPort
The UDP listening port number for Android devices
Private fieldm_AvailableScenes
The scenes available to host
Private fieldm_AvailableSessionsScreen
The available sessions screen
Private fieldm_BackButton
The back button used to go to the previous lobby screen
Private fieldm_ChatHistoryText
The chat history
Private fieldm_ChatInputField
The chat input field
Private fieldm_ConnectionStatusText
The connection status
Private fieldm_CurrentUIScreen
The current UI screen being disabled
Public fieldm_ErrorText
Error text displayed to the user when an error occurs
Private fieldm_FindButton
The find button
Private fieldm_GameSessionId
The game session id used for connecting to that game session
Private fieldm_HostButton
The host button
Private fieldm_HostOrFindSessionScreen
The host or find session screen
Private fieldm_InitializingConnection
Flag indicating whether or not we have initialized connecting to GameLift - used to stop the auto connect coroutine
Private fieldm_JoinMatchButton
The join match button
Private fieldm_LobbyScreen
The lobby screen
Private fieldm_LoginButton
The login button
Private fieldm_LoginScreen
The login screen
Private fieldm_MatchFoundButtonPosition
The position of the found match buttons
Private fieldm_MatchNameText
The match name
Private fieldm_PlayerCountText
The player count
Private fieldm_PlayerListText
The player list
Private fieldm_PreHostScreen
The Pre-host screen
Private fieldm_ReadyButton
The ready button
Private fieldm_RefreshAvailableSessionsButton
Refresh available sessions button
Private fieldm_RoomNameInputField
The room name input field
Private fieldm_SendChatButton
The send chat button
Private fieldm_SessionsAvailableHolder
The available session holder
Private fieldm_StartedAutoConnect
Used to prevent the auto connect coroutine from being activated more than once
Private fieldm_StartHostingButton
The start hosting button
Private fieldm_TryAutoConnectAgain
Helps regulate when auto connect gets called - prevents multiple from happening at the same time
Private fieldm_UsernameInputField
The username input field
Private fieldm_UsernameText
The name of the user
Private fieldm_WaitingForNextSceneScreen
The waiting for next scene screen
Top
See Also

Reference