Method RegisterPipelineStage
RegisterPipelineStage<T>(T)
Register a custom pipeline stage.
Declaration
public void RegisterPipelineStage<T>(T stage) where T : unmanaged, INetworkPipelineStage
Parameters
| Type | Name | Description |
|---|---|---|
| T | stage | An instance of the pipeline stage. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of the pipeline stage (must be unmanaged). |
Remarks
Can only be called before a driver is bound (see Bind(NetworkEndpoint)).
Note that the default pipeline stages (FragmentationPipelineStage, ReliableSequencedPipelineStage, UnreliableSequencedPipelineStage, and SimulatorPipelineStage) don't need to be registered. Registering a pipeline stage is only required for custom ones.
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | If the driver is not created or bound. Note that this is only thrown if safety checks are enabled (i.e. in the editor). Otherwise the pipeline is registered anyway (with likely erroneous behavior down the line). |