Noble Connect
Add relays and punchthrough to Mirror or UNet
NobleConnect.UNet.NobleNetworkLobbyManager Class Reference

Inherits NobleConnect.UNet.NobleNetworkManager.

Public Member Functions

void CheckReadyToBegin ()
void ServerReturnToLobby ()
bool SendReturnToLobby ()
override void OnServerConnect (NetworkConnection conn)
override void OnServerDisconnect (NetworkConnection conn)
override void OnServerAddPlayer (NetworkConnection conn, short playerControllerId)
override void OnServerRemovePlayer (NetworkConnection conn, PlayerController player)
override void ServerChangeScene (string sceneName)
override void OnServerSceneChanged (string sceneName)
override void OnStartServer ()
override void OnStartHost ()
override void OnStopHost ()
override void OnStartClient (NetworkClient lobbyClient)
override void OnClientConnect (NetworkConnection conn)
override void OnClientDisconnect (NetworkConnection conn)
override void OnStopClient ()
override void OnClientSceneChanged (NetworkConnection conn)
virtual void OnLobbyStartHost ()
virtual void OnLobbyStopHost ()
virtual void OnLobbyStartServer ()
virtual void OnLobbyServerConnect (NetworkConnection conn)
virtual void OnLobbyServerDisconnect (NetworkConnection conn)
virtual void OnLobbyServerSceneChanged (string sceneName)
virtual GameObject OnLobbyServerCreateLobbyPlayer (NetworkConnection conn, short playerControllerId)
virtual GameObject OnLobbyServerCreateGamePlayer (NetworkConnection conn, short playerControllerId)
virtual void OnLobbyServerPlayerRemoved (NetworkConnection conn, short playerControllerId)
virtual bool OnLobbyServerSceneLoadedForPlayer (GameObject lobbyPlayer, GameObject gamePlayer)
virtual void OnLobbyServerPlayersReady ()
virtual void OnLobbyClientEnter ()
virtual void OnLobbyClientExit ()
virtual void OnLobbyClientConnect (NetworkConnection conn)
virtual void OnLobbyClientDisconnect (NetworkConnection conn)
virtual void OnLobbyStartClient (NetworkClient lobbyClient)
virtual void OnLobbyStopClient ()
virtual void OnLobbyClientSceneChanged (NetworkConnection conn)
virtual void OnLobbyClientAddPlayerFailed ()
void TryToAddPlayer ()
- Public Member Functions inherited from NobleConnect.UNet.NobleNetworkManager
virtual void Awake ()
 Initialize connectionConfig and HostTopology plus some other important setup. More...
virtual void Start ()
virtual void Update ()
 Updates the NobleClient and NobleServer. More...
void InitClient ()
 Initialize the NobleClient and allocate a relay. More...
new void StartClient ()
 Like NetworkManager.StartClient() but utilizes the Noble Connect relay and punchthrough services. More...
void StartClient (IPEndPoint hostEndPoint)
 Connect to a HostEndPoint, utilizing the Noble Connect relay and punchthrough services. More...
void StartClientLANOnly (IPEndPoint hostEndPoint)
 Start a client in LAN only mode. No relays or punchthrough will be used. More...
void StartClientLANOnly ()
 Start a client in LAN only mode. No relays or punchthrough will be used. More...
new void StopClient ()
 Stop the client. More...
override NetworkClient StartHost ()
 Start hosting, connect a local client, and request a HostEndPoint from the NobleConnectServices More...
NetworkClient StartHostLANOnly ()
 Start hosting, connect a local client, but do no create a relay or enable punchthrough More...
new void StartServer ()
 Start a server and request a HostEndPoint from the NobleConnectServices More...
void StartServerLANonly ()
 Start a server, but do no create a relay or enable punchthrough More...
override void OnStartClient (NetworkClient unetClient)
override void OnStartServer ()
 Called when hosting starts. More...
void OnStartServerLANOnly ()
IPAddress GetALANAddress ()
virtual void OnFatalError (string errorMessage)
 Override this method to be informed when something goes horribly wrong. More...
override void OnStopServer ()
 Cleans up the server More...
override void OnServerConnect (NetworkConnection conn)
 Called when the server receives a client connection. More...
override void OnClientDisconnect (NetworkConnection conn)
override void OnServerDisconnect (NetworkConnection conn)
 Called on the server when a client disconnects More...
virtual void OnServerPrepared (string hostAddress, ushort hostPort)
 Override this method to know when a Server has received their HostEndPoint More...

Public Attributes

NobleLobbyPlayer[] lobbySlots
- Public Attributes inherited from NobleConnect.UNet.NobleNetworkManager
new NobleClient client
 The NobleClient that will be used to connect to the host. More...
GeographicRegion region = GeographicRegion.AUTO
 The geographic region to use when selecting a relay server. More...
bool forceRelayConnection
 You can enable this to force relay connections to be used for testing purposes. More...
int relayRefreshTime = 30
 How often to send relay refresh requests, in seconds. More...
float relayRefreshTimeout = .1f
 Initial timeout before resending refresh messages. This is doubled for each failed resend. More...
int maxRelayRefreshAttempts = 3
 Max number of times to try and resend refresh messages before giving up and shutting down the relay connection. More...
int relayLifetime = 30
 How long a relay will stay alive without being refreshed (in seconds) More...


bool showLobbyGUI [get, set]
int maxPlayers [get, set]
int maxPlayersPerConnection [get, set]
int minPlayers [get, set]
NobleLobbyPlayer lobbyPlayerPrefab [get, set]
GameObject gamePlayerPrefab [get, set]
string lobbyScene [get, set]
string playScene [get, set]
- Properties inherited from NobleConnect.UNet.NobleNetworkManager
IPEndPoint HostEndPoint [get]
 This is the address that clients should connect to. It is assigned by the relay server. More...

Additional Inherited Members

- Protected Member Functions inherited from NobleConnect.UNet.NobleNetworkManager
virtual void OnDestroy ()
 Clean up the client and server. More...
- Protected Attributes inherited from NobleConnect.UNet.NobleNetworkManager
bool isLANOnly
 If the current connection is LAN only More...

Member Function Documentation

◆ CheckReadyToBegin()

void NobleConnect.UNet.NobleNetworkLobbyManager.CheckReadyToBegin ( )

◆ OnClientConnect()

override void NobleConnect.UNet.NobleNetworkLobbyManager.OnClientConnect ( NetworkConnection  conn)

◆ OnClientDisconnect()

override void NobleConnect.UNet.NobleNetworkLobbyManager.OnClientDisconnect ( NetworkConnection  conn)

◆ OnClientSceneChanged()

override void NobleConnect.UNet.NobleNetworkLobbyManager.OnClientSceneChanged ( NetworkConnection  conn)

◆ OnLobbyClientAddPlayerFailed()

virtual void NobleConnect.UNet.NobleNetworkLobbyManager.OnLobbyClientAddPlayerFailed ( )

◆ OnLobbyClientConnect()

virtual void NobleConnect.UNet.NobleNetworkLobbyManager.OnLobbyClientConnect ( NetworkConnection  conn)

◆ OnLobbyClientDisconnect()

virtual void NobleConnect.UNet.NobleNetworkLobbyManager.OnLobbyClientDisconnect ( NetworkConnection  conn)

◆ OnLobbyClientEnter()

virtual void NobleConnect.UNet.NobleNetworkLobbyManager.OnLobbyClientEnter ( )

◆ OnLobbyClientExit()

virtual void NobleConnect.UNet.NobleNetworkLobbyManager.OnLobbyClientExit ( )

◆ OnLobbyClientSceneChanged()

virtual void NobleConnect.UNet.NobleNetworkLobbyManager.OnLobbyClientSceneChanged ( NetworkConnection  conn)

◆ OnLobbyServerConnect()

virtual void NobleConnect.UNet.NobleNetworkLobbyManager.OnLobbyServerConnect ( NetworkConnection  conn)

◆ OnLobbyServerCreateGamePlayer()

virtual GameObject NobleConnect.UNet.NobleNetworkLobbyManager.OnLobbyServerCreateGamePlayer ( NetworkConnection  conn,
short  playerControllerId 

◆ OnLobbyServerCreateLobbyPlayer()

virtual GameObject NobleConnect.UNet.NobleNetworkLobbyManager.OnLobbyServerCreateLobbyPlayer ( NetworkConnection  conn,
short  playerControllerId 

◆ OnLobbyServerDisconnect()

virtual void NobleConnect.UNet.NobleNetworkLobbyManager.OnLobbyServerDisconnect ( NetworkConnection  conn)

◆ OnLobbyServerPlayerRemoved()

virtual void NobleConnect.UNet.NobleNetworkLobbyManager.OnLobbyServerPlayerRemoved ( NetworkConnection  conn,
short  playerControllerId 

◆ OnLobbyServerPlayersReady()

virtual void NobleConnect.UNet.NobleNetworkLobbyManager.OnLobbyServerPlayersReady ( )

◆ OnLobbyServerSceneChanged()

virtual void NobleConnect.UNet.NobleNetworkLobbyManager.OnLobbyServerSceneChanged ( string  sceneName)

◆ OnLobbyServerSceneLoadedForPlayer()

virtual bool NobleConnect.UNet.NobleNetworkLobbyManager.OnLobbyServerSceneLoadedForPlayer ( GameObject  lobbyPlayer,
GameObject  gamePlayer 

◆ OnLobbyStartClient()

virtual void NobleConnect.UNet.NobleNetworkLobbyManager.OnLobbyStartClient ( NetworkClient  lobbyClient)

◆ OnLobbyStartHost()

virtual void NobleConnect.UNet.NobleNetworkLobbyManager.OnLobbyStartHost ( )

◆ OnLobbyStartServer()

virtual void NobleConnect.UNet.NobleNetworkLobbyManager.OnLobbyStartServer ( )

◆ OnLobbyStopClient()

virtual void NobleConnect.UNet.NobleNetworkLobbyManager.OnLobbyStopClient ( )

◆ OnLobbyStopHost()

virtual void NobleConnect.UNet.NobleNetworkLobbyManager.OnLobbyStopHost ( )

◆ OnServerAddPlayer()

override void NobleConnect.UNet.NobleNetworkLobbyManager.OnServerAddPlayer ( NetworkConnection  conn,
short  playerControllerId 

◆ OnServerConnect()

override void NobleConnect.UNet.NobleNetworkLobbyManager.OnServerConnect ( NetworkConnection  conn)

◆ OnServerDisconnect()

override void NobleConnect.UNet.NobleNetworkLobbyManager.OnServerDisconnect ( NetworkConnection  conn)

◆ OnServerRemovePlayer()

override void NobleConnect.UNet.NobleNetworkLobbyManager.OnServerRemovePlayer ( NetworkConnection  conn,
PlayerController  player 

◆ OnServerSceneChanged()

override void NobleConnect.UNet.NobleNetworkLobbyManager.OnServerSceneChanged ( string  sceneName)

◆ OnStartClient()

override void NobleConnect.UNet.NobleNetworkLobbyManager.OnStartClient ( NetworkClient  lobbyClient)

◆ OnStartHost()

override void NobleConnect.UNet.NobleNetworkLobbyManager.OnStartHost ( )

◆ OnStartServer()

override void NobleConnect.UNet.NobleNetworkLobbyManager.OnStartServer ( )

◆ OnStopClient()

override void NobleConnect.UNet.NobleNetworkLobbyManager.OnStopClient ( )

◆ OnStopHost()

override void NobleConnect.UNet.NobleNetworkLobbyManager.OnStopHost ( )

◆ SendReturnToLobby()

bool NobleConnect.UNet.NobleNetworkLobbyManager.SendReturnToLobby ( )

◆ ServerChangeScene()

override void NobleConnect.UNet.NobleNetworkLobbyManager.ServerChangeScene ( string  sceneName)

◆ ServerReturnToLobby()

void NobleConnect.UNet.NobleNetworkLobbyManager.ServerReturnToLobby ( )

◆ TryToAddPlayer()

void NobleConnect.UNet.NobleNetworkLobbyManager.TryToAddPlayer ( )

Member Data Documentation

◆ lobbySlots

NobleLobbyPlayer [] NobleConnect.UNet.NobleNetworkLobbyManager.lobbySlots

Property Documentation

◆ gamePlayerPrefab

GameObject NobleConnect.UNet.NobleNetworkLobbyManager.gamePlayerPrefab

◆ lobbyPlayerPrefab

NobleLobbyPlayer NobleConnect.UNet.NobleNetworkLobbyManager.lobbyPlayerPrefab

◆ lobbyScene

string NobleConnect.UNet.NobleNetworkLobbyManager.lobbyScene

◆ maxPlayers

int NobleConnect.UNet.NobleNetworkLobbyManager.maxPlayers

◆ maxPlayersPerConnection

int NobleConnect.UNet.NobleNetworkLobbyManager.maxPlayersPerConnection

◆ minPlayers

int NobleConnect.UNet.NobleNetworkLobbyManager.minPlayers

◆ playScene

string NobleConnect.UNet.NobleNetworkLobbyManager.playScene

◆ showLobbyGUI

bool NobleConnect.UNet.NobleNetworkLobbyManager.showLobbyGUI