Skip to content

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

NetLobbyInfo Manus.Networking.SimpleInterface.hostInfo;

variable interfaceGameObject

GameObject Manus.Networking.SimpleInterface.interfaceGameObject;

variable lobbyBrowser

SimpleLobbyBrowser Manus.Networking.SimpleInterface.lobbyBrowser;

variable networkManager

SimpleNetworkManager Manus.Networking.SimpleInterface.networkManager;

variable spawnableSample

NetObject Manus.Networking.SimpleInterface.spawnableSample;

Public Functions Documentation

function AutoJoin

inline void Manus::Networking::SimpleInterface::AutoJoin () 

function DirectJoin

inline void Manus::Networking::SimpleInterface::DirectJoin () 

function Host

inline void Manus::Networking::SimpleInterface::Host () 

function Join

inline void Manus::Networking::SimpleInterface::Join () 

function OnConnected

inline void Manus::Networking::SimpleInterface::OnConnected () 

function OnDisconnected

inline void Manus::Networking::SimpleInterface::OnDisconnected () 

function SetClientUsername

Sets the Client Username.

inline void Manus::Networking::SimpleInterface::SetClientUsername (
    string p_Username
) 

Parameters:

  • p_Username Username of the Client

function SetDirectJoinIPAddress

Sets the Direct Join IP Address.

inline void Manus::Networking::SimpleInterface::SetDirectJoinIPAddress (
    string p_Str
) 

Parameters:

  • p_Str IP Address

function SetDirectJoinPort

Sets the Direct Join Port.

inline void Manus::Networking::SimpleInterface::SetDirectJoinPort (
    string p_Str
) 

Parameters:

  • p_Str Port

function SetHostMaxPlayers

Set the Max Players in the hosting lobby information.

inline void Manus::Networking::SimpleInterface::SetHostMaxPlayers (
    string p_Str
) 

Parameters:

  • p_Str Amount of players

function SetHostName

Sets the Hosting Lobby Name.

inline void Manus::Networking::SimpleInterface::SetHostName (
    string p_ServerName
) 

Parameters:

  • p_ServerName Name of the Lobby

function SetUserName

Sets the Hosting Lobby Name.

inline void Manus::Networking::SimpleInterface::SetUserName (
    string p_UserName
) 

Parameters:

  • p_UserName Name of the User

The documentation for this class was generated from the following file api/unity-plugin/Scripts/Networking/SimpleInterface.cs