Class NetworkTransformPacketLossTests
Integration tests for NetworkTransform that will test both server and host operating modes and will test both authoritative models for each operating mode when packet loss and latency is present.
Inheritance
Inherited Members
Namespace: Unity.Netcode.RuntimeTests
Assembly: solution.dll
Syntax
public class NetworkTransformPacketLossTests : NetworkTransformBase
Constructors
NetworkTransformPacketLossTests(HostOrServer, Authority, RotationCompression, Rotation, Precision)
Constructor
Declaration
public NetworkTransformPacketLossTests(NetcodeIntegrationTest.HostOrServer testWithHost, NetworkTransformBase.Authority authority, NetworkTransformBase.RotationCompression rotationCompression, NetworkTransformBase.Rotation rotation, NetworkTransformBase.Precision precision)
Parameters
Type | Name | Description |
---|---|---|
Netcode |
testWithHost | Determines if we are running as a server or host |
Network |
authority | Determines if we are using server or owner authority |
Network |
rotationCompression | |
Network |
rotation | |
Network |
precision |
Methods
NetworkTransformMultipleChangesOverTime(TransformSpace, Axis)
Declaration
[UnityTestAttribute]
public IEnumerator NetworkTransformMultipleChangesOverTime(NetworkTransformBase.TransformSpace testLocalTransform, NetworkTransformBase.Axis axis)
Parameters
Type | Name | Description |
---|---|---|
Network |
testLocalTransform | |
Network |
axis |
Returns
Type | Description |
---|---|
IEnumerator |
OnServerAndClientsCreated()
This is invoked before the server and client(s) are started. Override this method if you want to make any adjustments to their NetworkManager instances.
Declaration
protected override void OnServerAndClientsCreated()
Overrides
ParentedNetworkTransformTest(Interpolation, bool, float)
Validates that transform values remain the same when a NetworkTransform is parented under another NetworkTransform under all of the possible axial conditions as well as when the parent has a varying scale.
Declaration
[UnityTestAttribute]
public IEnumerator ParentedNetworkTransformTest(NetworkTransformBase.Interpolation interpolation, bool worldPositionStays, float scale)
Parameters
Type | Name | Description |
---|---|---|
Network |
interpolation | |
bool | worldPositionStays | |
float | scale |
Returns
Type | Description |
---|---|
IEnumerator |
TestAuthoritativeTransformChangeOneAtATime(TransformSpace, Interpolation)
Tests changing all axial values one at a time with packet loss These tests are performed:
- While in local space and world space
- While interpolation is enabled and disabled
Declaration
[UnityTestAttribute]
public IEnumerator TestAuthoritativeTransformChangeOneAtATime(NetworkTransformBase.TransformSpace testLocalTransform, NetworkTransformBase.Interpolation interpolation)
Parameters
Type | Name | Description |
---|---|---|
Network |
testLocalTransform | |
Network |
interpolation |
Returns
Type | Description |
---|---|
IEnumerator |
TestSameFrameDeltaStateAndTeleport(TransformSpace, Interpolation)
Declaration
[UnityTestAttribute]
public IEnumerator TestSameFrameDeltaStateAndTeleport(NetworkTransformBase.TransformSpace testLocalTransform, NetworkTransformBase.Interpolation interpolation)
Parameters
Type | Name | Description |
---|---|---|
Network |
testLocalTransform | |
Network |
interpolation |
Returns
Type | Description |
---|---|
IEnumerator |