Class Manus::Networking::SimpleInterface
ClassList > Manus > Networking > SimpleInterface
A sample Interface which can be used to host or join a game.
Inherits the following classes: MonoBehaviour
Public Attributes
| Type | Name |
|---|---|
| NetLobbyInfo | hostInfo = = new NetLobbyInfo() The NetLobbyInfo that is used to advertise a lobby if the user decides to be a host. |
| GameObject | interfaceGameObject The game object that contains the interface, which is hidden upon connection. |
| SimpleLobbyBrowser | lobbyBrowser The SimpleLobbyBrowser that is used to display all the available lobbies. |
| SimpleNetworkManager | networkManager The SimpleNetworkManager that this interface communicates with. |
| NetObject | spawnableSample This object can be spawned by pressing the G key. |
Public Functions
| Type | Name |
|---|---|
| void | AutoJoin () Join the first found host. |
| void | DirectJoin () Join the lobby via a direct connection. |
| void | Host () Hosts a server, sets the lobby info and turns off the interface. |
| void | Join () Join the lobby selected in the interface. |
| void | OnConnected () Function called when a connection is made to a server. |
| void | OnDisconnected () Function called when a connection is lost to a server. |
| void | SetClientUsername (string p_Username) Sets the Client Username. |
| void | SetDirectJoinIPAddress (string p_Str) Sets the Direct Join IP Address. |
| void | SetDirectJoinPort (string p_Str) Sets the Direct Join Port. |
| void | SetHostMaxPlayers (string p_Str) Set the Max Players in the hosting lobby information. |
| void | SetHostName (string p_ServerName) Sets the Hosting Lobby Name. |
| void | SetUserName (string p_UserName) Sets the Hosting Lobby Name. |
Public Attributes Documentation
variable hostInfo
variable interfaceGameObject
variable lobbyBrowser
variable networkManager
variable spawnableSample
Public Functions Documentation
function AutoJoin
function DirectJoin
function Host
function Join
function OnConnected
function OnDisconnected
function SetClientUsername
Sets the Client Username.
Parameters:
p_UsernameUsername of the Client
function SetDirectJoinIPAddress
Sets the Direct Join IP Address.
Parameters:
p_StrIP Address
function SetDirectJoinPort
Sets the Direct Join Port.
Parameters:
p_StrPort
function SetHostMaxPlayers
Set the Max Players in the hosting lobby information.
Parameters:
p_StrAmount of players
function SetHostName
Sets the Hosting Lobby Name.
Parameters:
p_ServerNameName of the Lobby
function SetUserName
Sets the Hosting Lobby Name.
Parameters:
p_UserNameName of the User
The documentation for this class was generated from the following file api/unity-plugin/Scripts/Networking/SimpleInterface.cs