NetworkedBehaviour NetworkedObject NetworkingManager RpcMethod RpcMethod<T1> RpcMethod<T1,T2> RpcMethod<T1,T2,T3> RpcMethod<T1,T2,T3,T4> RpcMethod<T1,T2,T3,T4,T5> RpcMethod<T1,T2,T3,T4,T5,T6> RpcMethod<T1,T2,T3,T4,T5,T6,T7> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31> RpcMethod<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32> ResponseRpcMethod<TResult> ResponseRpcMethod<TResult,T1> ResponseRpcMethod<TResult,T1,T2> ResponseRpcMethod<TResult,T1,T2,T3> ResponseRpcMethod<TResult,T1,T2,T3,T4> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31> ResponseRpcMethod<TResult,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32> VisibilityDelegate ConnectionApprovedDelegate CustomMessageDelegete

NetworkingManager class

Namespace: MLAPI

Assembly: MLAPI.dll

The main component of the library

Public Properties

public float NetworkTime { get; }

A synchronized time, represents the time in seconds since the server application started. Is replicated across all clients

public NetworkingManager singleton { get; } Obsolete

The singleton instance of the NetworkingManager

public NetworkingManager Singleton { get; set; }

The singleton instance of the NetworkingManager

public ulong ServerClientId { get; }

Gets the networkId of the server

public ulong LocalClientId { get; set; }

The clientId the server calls the local client by, only valid for clients

public bool isServer { get; } Obsolete

Gets Whether or not a server is running

public bool IsServer { get; set; }

Gets Whether or not a server is running

public bool isClient { get; } Obsolete

Gets Whether or not a client is running

public bool IsClient { get; set; }

Gets Whether or not a client is running

public bool isHost { get; } Obsolete

Gets if we are running as host

public bool IsHost { get; }

Gets if we are running as host

public bool isListening { get; } Obsolete

Gets Whether or not we are listening for connections

public bool IsListening { get; set; }

Gets Whether or not we are listening for connections

public bool isConnectedClients { get; } Obsolete

Gets if we are connected as a client

public bool IsConnectedClient { get; set; }

Gets if we are connected as a client

public string ConnectedHostname { get; set; }

The current hostname we are connected to, used to validate certificate


Inherited Properties

public bool useGUILayout { get; set; }

Inherited from: MonoBehaviour

public bool runInEditMode { get; set; }

Inherited from: MonoBehaviour

public bool enabled { get; set; }

Inherited from: Behaviour

public bool isActiveAndEnabled { get; }

Inherited from: Behaviour

public Transform transform { get; }

Inherited from: Component

public GameObject gameObject { get; }

Inherited from: Component

public string tag { get; set; }

Inherited from: Component

public Component rigidbody { get; } Obsolete

Inherited from: Component

public Component rigidbody2D { get; } Obsolete

Inherited from: Component

public Component camera { get; } Obsolete

Inherited from: Component

public Component light { get; } Obsolete

Inherited from: Component

public Component animation { get; } Obsolete

Inherited from: Component

public Component constantForce { get; } Obsolete

Inherited from: Component

public Component renderer { get; } Obsolete

Inherited from: Component

public Component audio { get; } Obsolete

Inherited from: Component

public Component guiText { get; } Obsolete

Inherited from: Component

public Component networkView { get; } Obsolete

Inherited from: Component

public Component guiElement { get; } Obsolete

Inherited from: Component

public Component guiTexture { get; } Obsolete

Inherited from: Component

public Component collider { get; } Obsolete

Inherited from: Component

public Component collider2D { get; } Obsolete

Inherited from: Component

public Component hingeJoint { get; } Obsolete

Inherited from: Component

public Component particleEmitter { get; } Obsolete

Inherited from: Component

public Component particleSystem { get; } Obsolete

Inherited from: Component

public string name { get; set; }

Inherited from: Object

public HideFlags hideFlags { get; set; }

Inherited from: Object


Public Fields

public bool DontDestroy;

Gets or sets if the NetworkingManager should be marked as DontDestroyOnLoad

public bool RunInBackground;

Gets or sets if the application should be set to run in background

public LogLevel LogLevel;

The log level to use

public Dictionary<ulong,NetworkedClient> ConnectedClients;

Gets a dictionary of connected clients and their clientId keys

public List<NetworkedClient> ConnectedClientsList;

Gets a list of connected clients

public Dictionary<ulong,PendingClient> PendingClients;

Gets a dictionary of the clients that have been accepted by the transport but are still pending by the MLAPI.

public Action<ulong> OnClientConnectedCallback;

The callback to invoke once a client connects

public Action<ulong> OnClientDisconnectCallback;

The callback to invoke when a client disconnects

public Action OnServerStarted;

The callback to invoke once the server is ready

public Action<byte[],ulong,ConnectionApprovedDelegate> ConnectionApprovalCallback;

The callback to invoke during connection approval

public NetworkConfig NetworkConfig;

The current NetworkingConfiguration


Public Constructors

public NetworkingManager();


Public Methods

public void SendCustomMessage(List<ulong> clientIds, BitStream stream, string channel, SecuritySendFlags security);

Sends custom message to a list of clients

Parameters

List<ulong> clientIds

The clients to send to, sends to everyone if null

BitStream stream

The message stream containing the data

string channel

The channel to send the data on

SecuritySendFlags security

The security settings to apply to the message


public void SendCustomMessage(ulong clientId, BitStream stream, string channel, SecuritySendFlags security);

Sends a custom message to a specific client

Parameters

ulong clientId

The client to send the message to

BitStream stream

The message stream containing the data

string channel

The channel tos end the data on

SecuritySendFlags security

The security settings to apply to the message


public void StartServer();

Starts a server


public void StartClient();

Starts a client


public void StopServer();

Stops the running server


public void StopHost();

Stops the running host


public void StopClient();

Stops the running client


public void StartHost(Nullable<Vector3> position, Nullable<Quaternion> rotation, Nullable<ulong> prefabHash, Stream payloadStream);

Starts a Host

Parameters

Nullable<Vector3> position

Nullable<Quaternion> rotation

Nullable<ulong> prefabHash

Stream payloadStream



Inherited Methods

public bool IsInvoking();

Inherited from: MonoBehaviour

public void CancelInvoke();

Inherited from: MonoBehaviour

public void Invoke(string methodName, float time);

Inherited from: MonoBehaviour
Parameters

string methodName

float time


public void InvokeRepeating(string methodName, float time, float repeatRate);

Inherited from: MonoBehaviour
Parameters

string methodName

float time

float repeatRate


public void CancelInvoke(string methodName);

Inherited from: MonoBehaviour
Parameters

string methodName


public bool IsInvoking(string methodName);

Inherited from: MonoBehaviour
Parameters

string methodName


public Coroutine StartCoroutine(string methodName);

Inherited from: MonoBehaviour
Parameters

string methodName


public Coroutine StartCoroutine(string methodName, object value);

Inherited from: MonoBehaviour
Parameters

string methodName

object value


public Coroutine StartCoroutine(IEnumerator routine);

Inherited from: MonoBehaviour
Parameters

IEnumerator routine


public Coroutine StartCoroutine_Auto(IEnumerator routine); Obsolete

Inherited from: MonoBehaviour
Parameters

IEnumerator routine


public void StopCoroutine(IEnumerator routine);

Inherited from: MonoBehaviour
Parameters

IEnumerator routine


public void StopCoroutine(Coroutine routine);

Inherited from: MonoBehaviour
Parameters

Coroutine routine


public void StopCoroutine(string methodName);

Inherited from: MonoBehaviour
Parameters

string methodName


public void StopAllCoroutines();

Inherited from: MonoBehaviour

public Component GetComponent(Type type);

Inherited from: Component
Parameters

Type type


public T GetComponent();

Inherited from: Component

public Component GetComponent(string type);

Inherited from: Component
Parameters

string type


public Component GetComponentInChildren(Type t, bool includeInactive);

Inherited from: Component
Parameters

Type t

bool includeInactive


public Component GetComponentInChildren(Type t);

Inherited from: Component
Parameters

Type t


public T GetComponentInChildren(bool includeInactive);

Inherited from: Component
Parameters

bool includeInactive


public T GetComponentInChildren();

Inherited from: Component

public Component[] GetComponentsInChildren(Type t, bool includeInactive);

Inherited from: Component
Parameters

Type t

bool includeInactive


public Component[] GetComponentsInChildren(Type t);

Inherited from: Component
Parameters

Type t


public T[] GetComponentsInChildren(bool includeInactive);

Inherited from: Component
Parameters

bool includeInactive


public void GetComponentsInChildren(bool includeInactive, List<T> result);

Inherited from: Component
Parameters

bool includeInactive

List<T> result


public T[] GetComponentsInChildren();

Inherited from: Component

public void GetComponentsInChildren(List<T> results);

Inherited from: Component
Parameters

List<T> results


public Component GetComponentInParent(Type t);

Inherited from: Component
Parameters

Type t


public T GetComponentInParent();

Inherited from: Component

public Component[] GetComponentsInParent(Type t, bool includeInactive);

Inherited from: Component
Parameters

Type t

bool includeInactive


public Component[] GetComponentsInParent(Type t);

Inherited from: Component
Parameters

Type t


public T[] GetComponentsInParent(bool includeInactive);

Inherited from: Component
Parameters

bool includeInactive


public void GetComponentsInParent(bool includeInactive, List<T> results);

Inherited from: Component
Parameters

bool includeInactive

List<T> results


public T[] GetComponentsInParent();

Inherited from: Component

public Component[] GetComponents(Type type);

Inherited from: Component
Parameters

Type type


public void GetComponents(Type type, List<Component> results);

Inherited from: Component
Parameters

Type type

List<Component> results


public void GetComponents(List<T> results);

Inherited from: Component
Parameters

List<T> results


public T[] GetComponents();

Inherited from: Component

public bool CompareTag(string tag);

Inherited from: Component
Parameters

string tag


public void SendMessageUpwards(string methodName, object value, SendMessageOptions options);

Inherited from: Component
Parameters

string methodName

object value

SendMessageOptions options


public void SendMessageUpwards(string methodName, object value);

Inherited from: Component
Parameters

string methodName

object value


public void SendMessageUpwards(string methodName);

Inherited from: Component
Parameters

string methodName


public void SendMessageUpwards(string methodName, SendMessageOptions options);

Inherited from: Component
Parameters

string methodName

SendMessageOptions options


public void SendMessage(string methodName, object value);

Inherited from: Component
Parameters

string methodName

object value


public void SendMessage(string methodName);

Inherited from: Component
Parameters

string methodName


public void SendMessage(string methodName, object value, SendMessageOptions options);

Inherited from: Component
Parameters

string methodName

object value

SendMessageOptions options


public void SendMessage(string methodName, SendMessageOptions options);

Inherited from: Component
Parameters

string methodName

SendMessageOptions options


public void BroadcastMessage(string methodName, object parameter, SendMessageOptions options);

Inherited from: Component
Parameters

string methodName

object parameter

SendMessageOptions options


public void BroadcastMessage(string methodName, object parameter);

Inherited from: Component
Parameters

string methodName

object parameter


public void BroadcastMessage(string methodName);

Inherited from: Component
Parameters

string methodName


public void BroadcastMessage(string methodName, SendMessageOptions options);

Inherited from: Component
Parameters

string methodName

SendMessageOptions options


public int GetInstanceID();

Inherited from: Object

public int GetHashCode();

Inherited from: Object

public bool Equals(object other);

Inherited from: Object
Parameters

object other


public string ToString();

Inherited from: Object

public Type GetType();

Inherited from: object