Struct SimulatorUtility.Parameters
Configuration parameters for the simulator pipeline stage.
Implements
Inherited Members
Namespace: Unity.Networking.Transport.Utilities
Assembly: solution.dll
Syntax
public struct SimulatorUtility.Parameters : INetworkParameter
Fields
| Name | Description |
|---|---|
| FuzzFactor | The fuzz factor is a percentage that represents both the proportion of packets that should be fuzzed, and the probability of any bit being flipped in the packet. For example, a value of 5 means about 5% of packets will be modified, and for each packet modified, each bit has a 5% chance of being flipped. |
| FuzzOffset | To be used along the fuzz factor. The offset is the offset inside the packet where fuzzing should start. Useful to avoid fuzzing headers for example. |
| MaxPacketCount | The maximum amount of packets the pipeline can keep track of. This used when a packet is delayed, the packet is stored in the pipeline processing buffer and can be later brought back. |
| MaxPacketSize | The maximum size of a packet which the simulator stores. If a packet exceeds this size it will bypass the simulator. |
| Mode | Denotes whether or not the SimulatorPipelineStage should apply to sent or received packets (or both). |
| PacketDelayMs | Fixed delay to apply to all packets which pass through. |
| PacketDropInterval | Fixed interval to drop packets on. This is most suitable for tests where predictable behaviour is desired, as every X-th packet will be dropped. For example, if the value is 5 every fifth packet is dropped. |
| PacketDropPercentage | Percentage of packets that will be dropped. |
| PacketDuplicationPercentage | Percentage of packets that will be duplicated. Packets are duplicated at most once and will not be duplicated if they were first deemed to be dropped. |
| PacketJitterMs | Variance of the delay that gets added to all packets that pass through. For example, setting this value to 5 will result in the delay being a random value within 5 milliseconds of the value set with PacketDelayMs. |
| RandomSeed | Value to use to seed the random number generator. For non-deterministic behavior, use a
dynamic value here (e.g. the result of a call to |
Methods
| Name | Description |
|---|---|
| Validate() | Checks if the values for all fields are valid. This method will be automatically called when adding parameters to the NetworkSettings. |