Humanoid Control for Unity v4
No Matches
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
Passer.NetworkingStarter Class Reference


Setup and start of networking.

To make a networked multiplayer environment you can use the Networking Starter component. It is still possible to use dedicated code and components for the chosen networking solution instead which will give you more control of the setup of the network.

The easiest way to turn a single-user scene in a multi-user environment is to add the NetworkingStarter prefab to the scene. You can find this in the Humanoid->Prefabs->Networking folder.

Inherits Photon.Pun.MonoBehaviourPunCallbacks public class NetworkingStarter Photon.PunBehaviour public class NetworkingStarter Bolt.GlobalEventListener public class NetworkingStarter MonoBehaviour.

Inherited by Passer.Humanoid.NetworkingSpawner.

Public Types

enum  ServerType { CloudServer , OwnServer }
 Server types.
enum  Role { Host , Client }
 Network Role.

Public Member Functions

void StartHost ()
 Start local networking with Host role.
void StartClient ()
 Start local networking with Client role.
void StartClient (string roomName, int gameVersion)
 Start cloud networking with Client role.
override void OnConnectedToMaster ()
override void OnJoinRoomFailed (short returnCode, string message) public override void OnPhotonJoinRoomFailed(object[] codeAndMsg)
override void OnJoinedRoom ()
override void BoltStartDone ()
override void SessionListUpdated (Map< Guid, UdpSession > sessionList)

Public Attributes

bool autoStart = true
string serverIpAddress = ""
 The IP address of the host.
string roomName = "default"
 The name of the environment shared by all the users.
int gameVersion = 1
 The version of the environment shared by all the users.
GameObject playerPrefab
 The player prefab which will be spawned across the network.
ServerType serverType
 The type of server used for the network.
bool useRoleFile = false
 Enables the use of a role file which determines whether the application is a Host or a Client.
string roleFileName = "Role.txt"
 The filename of the role file.
Role role
 The Role of this application.
int sendRate = 25
 The rate at which humanoid pose messages are sent.

Protected Member Functions

virtual void Awake ()
virtual void Start ()

Protected Attributes

INetworkingStarter starter = new UnetStarter()


bool connected [get, protected set]
 Indication whether the application is connected to the network.
bool connecting [get, protected set]
 Indication whether the application is trying to connect to the network.

Member Data Documentation

◆ sendRate

int Passer.NetworkingStarter.sendRate = 25

The rate at which humanoid pose messages are sent.

In messages per second

The documentation for this class was generated from the following file: