SendCommandOverChannel
Methods
public bool SendCommandOverChannel<TTarget>(string methodName, MessageTarget target, Channel channel) where TTarget : class
Send a command over a specified channel to another client to call a method on one of its components.
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. |
| Channel | channel | The channel over which the command is 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 SendCommandOverChannel(Type targetType, string methodName, MessageTarget target, Channel channel)
Send a command over a specified channel to another client to call a method on one of its components.
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. |
| Channel | channel |
Returns
| Type | Description |
|---|---|
| bool | true if the sending was successful. |
public bool SendCommandOverChannel<TTarget>(string methodName, MessageTarget target, Channel channel, params object[] args) where TTarget : class
Send a command over a specified channel to another client to call a method on one of its components.
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. |
| Channel | channel | |
| 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 SendCommandOverChannel(Type targetType, string methodName, MessageTarget target, Channel channel, params object[] args)
Send a command over a specified channel to another client to call a method on one of its components.
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. |
| Channel | channel | |
| 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 SendCommandOverChannel<TTarget>(string methodName, MessageTarget target, Channel channel, params (Type, object)[] args) where TTarget : class
Send a command over a specified channel to another client to call a method on one of its components.
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. |
| Channel | channel | |
| (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 SendCommandOverChannel(Type targetType, string methodName, MessageTarget target, Channel channel, params (Type, object)[] args)
Send a command over a specified channel to another client to call a method on one of its components.
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. |
| Channel | channel | |
| (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 SendCommandOverChannel(Action action, MessageTarget target, Channel channel)
Send a command over a specified channel to another client to call a method in a specific component, if you have more than one component method bound in the same hierarchy.
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. |
| Channel | channel | The channel over which the command is sent. |
Returns
| Type | Description |
|---|---|
| bool | true if the sending was successful. |
public bool SendCommandOverChannel<T1>(Action<T1> action, MessageTarget target, Channel channel, T1 param1)
Send a command over a specified channel to another client to call a method in a specific component, if you have more than one component method bound in the same hierarchy.
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. |
| Channel | channel | The channel over which the command is 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 SendCommandOverChannel<T1, T2>(Action<T1, T2> action, MessageTarget target, Channel channel, T1 param1, T2 param2)
Send a command over a specified channel to another client to call a method in a specific component, if you have more than one component method bound in the same hierarchy.
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. |
| Channel | channel | The channel over which the command is 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 SendCommandOverChannel<T1, T2, T3>(Action<T1, T2, T3> action, MessageTarget target, Channel channel, T1 param1, T2 param2, T3 param3)
Send a command over a specified channel to another client to call a method in a specific component, if you have more than one component method bound in the same hierarchy.
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. |
| Channel | channel | The channel over which the command is 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 SendCommandOverChannel<T1, T2, T3, T4>(Action<T1, T2, T3, T4> action, MessageTarget target, Channel channel, T1 param1, T2 param2, T3 param3, T4 param4)
Send a command over a specified channel to another client to call a method in a specific component, if you have more than one component method bound in the same hierarchy.
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. |
| Channel | channel | The channel over which the command is 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 SendCommandOverChannel<T1, T2, T3, T4, T5>(Action<T1, T2, T3, T4, T5> action, MessageTarget target, Channel channel, T1 param1, T2 param2, T3 param3, T4 param4, T5 param5)
Send a command over a specified channel to another client to call a method in a specific component, if you have more than one component method bound in the same hierarchy.
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. |
| Channel | channel | The channel over which the command is 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 SendCommandOverChannel<T1, T2, T3, T4, T5, T6>(Action<T1, T2, T3, T4, T5, T6> action, MessageTarget target, Channel channel, T1 param1, T2 param2, T3 param3, T4 param4, T5 param5, T6 param6)
Send a command over a specified channel to another client to call a method in a specific component, if you have more than one component method bound in the same hierarchy.
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. |
| Channel | channel | The channel over which the command is 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 SendCommandOverChannel<T1, T2, T3, T4, T5, T6, T7>(Action<T1, T2, T3, T4, T5, T6, T7> action, MessageTarget target, Channel channel, T1 param1, T2 param2, T3 param3, T4 param4, T5 param5, T6 param6, T7 param7)
Send a command over a specified channel to another client to call a method in a specific component, if you have more than one component method bound in the same hierarchy.
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. |
| Channel | channel | The channel over which the command is 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 SendCommandOverChannel<T1, T2, T3, T4, T5, T6, T7, T8>(Action<T1, T2, T3, T4, T5, T6, T7, T8> action, MessageTarget target, Channel channel, T1 param1, T2 param2, T3 param3, T4 param4, T5 param5, T6 param6, T7 param7, T8 param8)
Send a command over a specified channel to another client to call a method in a specific component, if you have more than one component method bound in the same hierarchy.
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. |
| Channel | channel | The channel over which the command is 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 |