Method CreatePipeline
CreatePipeline(params Type[])
Create a new pipeline from stage types.
Declaration
public NetworkPipeline CreatePipeline(params Type[] stages)
Parameters
Type | Name | Description |
---|---|---|
Type[] | stages | Array of stages the pipeline should contain. |
Returns
Type | Description |
---|---|
Network |
Remarks
The order of the different stages is important, as that is the order in which the stages will process a packet when sending messages (the reverse order is used when processing received packets).
Exceptions
Type | Condition |
---|---|
Invalid |
If called after the driver has established connections or before it is created. Note this is only thrown if safety checks are enabled (i.e. in the editor). |
CreatePipeline(NativeArray<NetworkPipelineStageId>)
Create a new pipeline from stage IDs.
Declaration
public NetworkPipeline CreatePipeline(NativeArray<NetworkPipelineStageId> stages)
Parameters
Type | Name | Description |
---|---|---|
Native |
stages | Array of stage IDs the pipeline should contain. |
Returns
Type | Description |
---|---|
Network |
Remarks
The order of the different stages is important, as that is the order in which the stages will process a packet when sending messages (the reverse order is used when processing received packets).
Note that this method is Burst-compatible. Note also that no reference to the native array is kept internally by the driver. It is thus safe to dispose of it immediately after calling this method (or to use a temporary allocation for the array).
Exceptions
Type | Condition |
---|---|
Invalid |
If called after the driver has established connections or before it is created. Note this is only thrown if safety checks are enabled (i.e. in the editor). |