Table of Contents

SendOrderedCommand

Methods
public bool SendOrderedCommand<TTarget>(string methodName, MessageTarget target) where TTarget : Component

Send an ordered command to another client to call a method on one of its components. Command being ordered means that it will arrive on other clients in the same order relative to other sent ordered commands (and other ordered changes) from this client.

Parameters
Type Name Description
string methodName

The name of the method to call. Tip: use C#'s nameof() operator to avoid name mismatches.

MessageTarget target

To which clients should this command be sent.

Returns
Type Description
bool

true if the sending was successful.

Type Parameters
Name Description
TTarget

The type of the Unity component that contains the method to call.

public bool SendOrderedCommand(Type targetType, string methodName, MessageTarget target)

Send an ordered command to another client to call a method on one of its components. Command being ordered means that it will arrive on other clients in the same order relative to other sent ordered commands (and other ordered changes) from this client.

Parameters
Type Name Description
Type targetType

The type of the Unity component that contains the method to call.

string methodName

The name of the method to call. Tip: use C#'s nameof() operator to avoid name mismatches.

MessageTarget target

To which clients should this command be sent.

Returns
Type Description
bool

true if the sending was successful.

public bool SendOrderedCommand<TTarget>(string methodName, MessageTarget target, params object[] args) where TTarget : Component

Send an ordered command to another client to call a method on one of its components. Command being ordered means that it will arrive on other clients in the same order relative to other sent ordered commands (and other ordered changes) from this client.

Parameters
Type Name Description
string methodName

The name of the method to call. Tip: use C#'s nameof() operator to avoid name mismatches.

MessageTarget target

To which clients should this command be sent.

object[] args

The arguments to send to the method, make sure they match its signature.

Returns
Type Description
bool

true if the sending was successful.

Type Parameters
Name Description
TTarget

The type of the Unity component that contains the method to call.

public bool SendOrderedCommand(Type targetType, string methodName, MessageTarget target, params object[] args)

Send an ordered command to another client to call a method on one of its components. Command being ordered means that it will arrive on other clients in the same order relative to other sent ordered commands (and other ordered changes) from this client.

Parameters
Type Name Description
Type targetType

The type of the Unity component that contains the method to call.

string methodName

The name of the method to call. Tip: use C#'s nameof() operator to avoid name mismatches.

MessageTarget target

To which clients should this command be sent.

object[] args

The arguments to send to the method, make sure they match its signature.

Returns
Type Description
bool

true if the sending was successful.

public bool SendOrderedCommand<TTarget>(string methodName, MessageTarget target, params (Type, object)[] args) where TTarget : Component

Send an ordered command to another client to call a method on one of its components. Command being ordered means that it will arrive on other clients in the same order relative to other sent ordered commands (and other ordered changes) from this client.

Parameters
Type Name Description
string methodName

The name of the method to call. Tip: use C#'s nameof() operator to avoid name mismatches.

MessageTarget target

To which clients should this command be sent.

(Type, object)[] args

The arguments to send to the method, make sure they match its signature. This version of SendCommand uses tuples with the type and the value of each argument, this enables sending of null values.

Returns
Type Description
bool

true if the sending was successful.

Type Parameters
Name Description
TTarget

The type of the Unity component that contains the method to call.

public bool SendOrderedCommand(Type targetType, string methodName, MessageTarget target, params (Type, object)[] args)

Send an ordered command to another client to call a method on one of its components. Command being ordered means that it will arrive on other clients in the same order relative to other sent ordered commands (and other ordered changes) from this client.

Parameters
Type Name Description
Type targetType
string methodName

The name of the method to call. Tip: use C#'s nameof() operator to avoid name mismatches.

MessageTarget target

To which clients should this command be sent.

(Type, object)[] args

The arguments to send to the method, make sure they match its signature. This version of SendCommand uses tuples with the type and the value of each argument, this enables sending of null values.

Returns
Type Description
bool

true if the sending was successful.

public bool SendOrderedCommand(Action action, MessageTarget target)

Send an ordered command to another client to call a method in a specific component, if you have more than one component method bound in the same hierarchy. Command being ordered means that it will arrive on other clients in the same order relative to other sent ordered commands (and other ordered changes) from this client.

Parameters
Type Name Description
Action action

Action instance of the component and method command that you wish to send

MessageTarget target

To which clients should this command be sent.

Returns
Type Description
bool

true if the sending was successful.

public bool SendOrderedCommand<T1>(Action<T1> action, MessageTarget target, T1 param1)

Send an ordered command to another client to call a method in a specific component, if you have more than one component method bound in the same hierarchy. Command being ordered means that it will arrive on other clients in the same order relative to other sent ordered commands (and other ordered changes) from this client.

Parameters
Type Name Description
Action<T1> action

Action instance of the component and method command that you wish to send

MessageTarget target

To which clients should this command be sent.

T1 param1

Argument of type T1 to send to the method

Returns
Type Description
bool

true if the sending was successful.

Type Parameters
Name Description
T1
public bool SendOrderedCommand<T1, T2>(Action<T1, T2> action, MessageTarget target, T1 param1, T2 param2)

Send an ordered command to another client to call a method in a specific component, if you have more than one component method bound in the same hierarchy. Command being ordered means that it will arrive on other clients in the same order relative to other sent ordered commands (and other ordered changes) from this client.

Parameters
Type Name Description
Action<T1, T2> action

Action instance of the component and method command that you wish to send

MessageTarget target

To which clients should this command be sent.

T1 param1

Argument of type T1 to send to the method

T2 param2

Argument of type T2 to send to the method

Returns
Type Description
bool

true if the sending was successful.

Type Parameters
Name Description
T1
T2
public bool SendOrderedCommand<T1, T2, T3>(Action<T1, T2, T3> action, MessageTarget target, T1 param1, T2 param2, T3 param3)

Send an ordered command to another client to call a method in a specific component, if you have more than one component method bound in the same hierarchy. Command being ordered means that it will arrive on other clients in the same order relative to other sent ordered commands (and other ordered changes) from this client.

Parameters
Type Name Description
Action<T1, T2, T3> action

Action instance of the component and method command that you wish to send

MessageTarget target

To which clients should this command be sent.

T1 param1

Argument of type T1 to send to the method

T2 param2

Argument of type T2 to send to the method

T3 param3

Argument of type T3 to send to the method

Returns
Type Description
bool

true if the sending was successful.

Type Parameters
Name Description
T1
T2
T3
public bool SendOrderedCommand<T1, T2, T3, T4>(Action<T1, T2, T3, T4> action, MessageTarget target, T1 param1, T2 param2, T3 param3, T4 param4)

Send an ordered command to another client to call a method in a specific component, if you have more than one component method bound in the same hierarchy. Command being ordered means that it will arrive on other clients in the same order relative to other sent ordered commands (and other ordered changes) from this client.

Parameters
Type Name Description
Action<T1, T2, T3, T4> action

Action instance of the component and method command that you wish to send

MessageTarget target

To which clients should this command be sent.

T1 param1

Argument of type T1 to send to the method

T2 param2

Argument of type T2 to send to the method

T3 param3

Argument of type T3 to send to the method

T4 param4

Argument of type T4 to send to the method

Returns
Type Description
bool

true if the sending was successful.

Type Parameters
Name Description
T1
T2
T3
T4
public bool SendOrderedCommand<T1, T2, T3, T4, T5>(Action<T1, T2, T3, T4, T5> action, MessageTarget target, T1 param1, T2 param2, T3 param3, T4 param4, T5 param5)

Send an ordered command to another client to call a method in a specific component, if you have more than one component method bound in the same hierarchy. Command being ordered means that it will arrive on other clients in the same order relative to other sent ordered commands (and other ordered changes) from this client.

Parameters
Type Name Description
Action<T1, T2, T3, T4, T5> action

Action instance of the component and method command that you wish to send

MessageTarget target

To which clients should this command be sent.

T1 param1

Argument of type T1 to send to the method

T2 param2

Argument of type T2 to send to the method

T3 param3

Argument of type T3 to send to the method

T4 param4

Argument of type T4 to send to the method

T5 param5

Argument of type T5 to send to the method

Returns
Type Description
bool

true if the sending was successful.

Type Parameters
Name Description
T1
T2
T3
T4
T5
public bool SendOrderedCommand<T1, T2, T3, T4, T5, T6>(Action<T1, T2, T3, T4, T5, T6> action, MessageTarget target, T1 param1, T2 param2, T3 param3, T4 param4, T5 param5, T6 param6)

Send an ordered command to another client to call a method in a specific component, if you have more than one component method bound in the same hierarchy. Command being ordered means that it will arrive on other clients in the same order relative to other sent ordered commands (and other ordered changes) from this client.

Parameters
Type Name Description
Action<T1, T2, T3, T4, T5, T6> action

Action instance of the component and method command that you wish to send

MessageTarget target

To which clients should this command be sent.

T1 param1

Argument of type T1 to send to the method

T2 param2

Argument of type T2 to send to the method

T3 param3

Argument of type T3 to send to the method

T4 param4

Argument of type T4 to send to the method

T5 param5

Argument of type T5 to send to the method

T6 param6

Argument of type T6 to send to the method

Returns
Type Description
bool

true if the sending was successful.

Type Parameters
Name Description
T1
T2
T3
T4
T5
T6
public bool SendOrderedCommand<T1, T2, T3, T4, T5, T6, T7>(Action<T1, T2, T3, T4, T5, T6, T7> action, MessageTarget target, T1 param1, T2 param2, T3 param3, T4 param4, T5 param5, T6 param6, T7 param7)

Send an ordered command to another client to call a method in a specific component, if you have more than one component method bound in the same hierarchy. Command being ordered means that it will arrive on other clients in the same order relative to other sent ordered commands (and other ordered changes) from this client.

Parameters
Type Name Description
Action<T1, T2, T3, T4, T5, T6, T7> action

Action instance of the component and method command that you wish to send

MessageTarget target

To which clients should this command be sent.

T1 param1

Argument of type T1 to send to the method

T2 param2

Argument of type T2 to send to the method

T3 param3

Argument of type T3 to send to the method

T4 param4

Argument of type T4 to send to the method

T5 param5

Argument of type T5 to send to the method

T6 param6

Argument of type T6 to send to the method

T7 param7

Argument of type T7 to send to the method

Returns
Type Description
bool

true if the sending was successful.

Type Parameters
Name Description
T1
T2
T3
T4
T5
T6
T7
public bool SendOrderedCommand<T1, T2, T3, T4, T5, T6, T7, T8>(Action<T1, T2, T3, T4, T5, T6, T7, T8> action, MessageTarget target, T1 param1, T2 param2, T3 param3, T4 param4, T5 param5, T6 param6, T7 param7, T8 param8)

Send an ordered command to another client to call a method in a specific component, if you have more than one component method bound in the same hierarchy. Command being ordered means that it will arrive on other clients in the same order relative to other sent ordered commands (and other ordered changes) from this client.

Parameters
Type Name Description
Action<T1, T2, T3, T4, T5, T6, T7, T8> action

Action instance of the component and method command that you wish to send

MessageTarget target

To which clients should this command be sent.

T1 param1

Argument of type T1 to send to the method

T2 param2

Argument of type T2 to send to the method

T3 param3

Argument of type T3 to send to the method

T4 param4

Argument of type T4 to send to the method

T5 param5

Argument of type T5 to send to the method

T6 param6

Argument of type T6 to send to the method

T7 param7

Argument of type T7 to send to the method

T8 param8

Argument of type T8 to send to the method

Returns
Type Description
bool

true if the sending was successful.

Type Parameters
Name Description
T1
T2
T3
T4
T5
T6
T7
T8