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 SpawnDelegate ConnectionApprovedDelegate

NetworkConfig class

Namespace: MLAPI.Configuration

Assembly: MLAPI.dll

The configuration object used to start server, client and hosts

Public Properties

public X509Certificate2 ServerX509Certificate { get; set; }

Gets the currently in use certificate

public byte[] ServerX509CertificateBytes { get; }

Gets the cached binary representation of the server certificate that's used for handshaking


Public Fields

public ushort ProtocolVersion;

The protocol version. Different versions doesn't talk to each other.

public Transport NetworkTransport;

The transport hosts the sever uses

public List<string> RegisteredScenes;

A list of SceneNames that can be used during networked games.

public bool AllowRuntimeSceneChanges;

Whether or not runtime scene changes should be allowed and expected. If this is true, clients with different initial configurations will not work together.

public List<NetworkedPrefab> NetworkedPrefabs;

A list of spawnable prefabs

public bool CreatePlayerPrefab;

Whether or not a player object should be created by default. This value can be overriden on a case by case basis with ConnectionApproval.

public int ReceiveTickrate;

Amount of times per second the receive queue is emptied and all messages inside are processed.

public int MaxReceiveEventsPerTickRate;

The max amount of messages to process per ReceiveTickrate. This is to prevent flooding.

public int EventTickrate;

The amount of times per second internal frame events will occur, examples include SyncedVar send checking.

public int MaxObjectUpdatesPerTick;

The maximum amount of NetworkedObject's to process per tick. This is useful to prevent the MLAPI from hanging a frame Set this to less than or equal to 0 for unlimited

public int ClientConnectionBufferTimeout;

The amount of seconds to wait for handshake to complete before timing out a client

public bool ConnectionApproval;

Whether or not to use connection approval

public byte[] ConnectionData;

The data to send during connection which can be used to decide on if a client should get accepted

public int SecondsHistory;

The amount of seconds to keep a lag compensation position history

public bool EnableTimeResync;

If your logic uses the NetworkedTime, this should probably be turned off. If however it's needed to maximize accuracy, this is recommended to be turned on

public int TimeResyncInterval;

If time resync is turned on, this specifies the interval between syncs in seconds.

public bool EnableNetworkedVar;

Whether or not to enable the NetworkedVar system. This system runs in the Update loop and will degrade performance, but it can be a huge convenience. Only turn it off if you have no need for the NetworkedVar system.

public bool EnsureNetworkedVarLengthSafety;

Whether or not to ensure that NetworkedVars can be read even if a client accidentally writes where its not allowed to. This costs some CPU and bandwdith.

public bool ForceSamePrefabs;

Whether or not the MLAPI should check for differences in the prefabs at connection. If you dynamically add prefabs at runtime, turn this OFF

public bool UsePrefabSync;

If true, all NetworkedObject's need to be prefabs and all scene objects will be replaced on server side which causes all serialization to be lost. Useful for multi project setups If false, Only non scene objects have to be prefabs. Scene objects will be matched using their PrefabInstanceId which can be precomputed globally for a scene at build time. Useful for single projects

public bool RecycleNetworkIds;

If true, NetworkIds will be reused after the NetworkIdRecycleDelay.

public float NetworkIdRecycleDelay;

The amount of seconds a NetworkId has to be unused in order for it to be reused.

public HashSize RpcHashSize;

Decides how many bytes to use for Rpc messaging. Leave this to 2 bytes unless you are facing hash collisions

public int LoadSceneTimeOut;

The amount of seconds to wait on all clients to load requested scene before the SwitchSceneProgress onComplete callback, that waits for all clients to complete loading, is called anyway.

public bool EnableEncryption;

Whether or not to enable the ECDHE key exchange to allow for encryption and authentication of messages

public bool SignKeyExchange;

Whether or not to enable signed diffie hellman key exchange.

public string ServerBase64PfxCertificate;

Pfx file in base64 encoding containing private and public key


Public Constructors

public NetworkConfig();


Public Methods

public string ToBase64();

Returns a base64 encoded version of the config

Returns string


public void FromBase64(string base64);

Sets the NetworkConfig data with that from a base64 encoded version

Parameters

string base64

The base64 encoded version


public ulong GetConfig(bool cache);

Gets a SHA256 hash of parts of the NetworkingConfiguration instance

Parameters

bool cache

Returns ulong


public bool CompareConfig(ulong hash);

Compares a SHA256 hash with the current NetworkingConfiguration instances hash

Parameters

ulong hash

Returns bool



Inherited Methods

public bool Equals(object obj);

Inherited from: object
Parameters

object obj


public int GetHashCode();

Inherited from: object

public Type GetType();

Inherited from: object

public string ToString();

Inherited from: object