Integration tests for NetworkTransform that will test both
server and host operating modes and will test both authoritative
models for each operating mode.
Inheritance
NetworkTransformTests
public class NetworkTransformTests : IntegrationTestWithApproximation
Constructors
Declaration
public NetworkTransformTests(NetcodeIntegrationTest.HostOrServer testWithHost, NetworkTransformTests.Authority authority)
Parameters
Properties
Declaration
protected override bool m_EnableTimeTravel { get; }
Property Value
Overrides
Declaration
protected override bool m_SetupIsACoroutine { get; }
Property Value
Overrides
Declaration
protected override bool m_TearDownIsACoroutine { get; }
Property Value
Overrides
Declaration
protected override int NumberOfClients { get; }
Property Value
Overrides
Methods
Declaration
protected override float GetDeltaVarianceThreshold()
Returns
Overrides
Checks scale of a late joining client for all instances of the late joining client's player
Declaration
public void LateJoiningPlayerInitialScaleValues(NetworkTransformTests.TransformSpace testLocalTransform, NetworkTransformTests.Interpolation interpolation, NetworkTransformTests.OverrideState overideState)
Parameters
This validates that multiple changes can occur within the same tick or over
several ticks while still keeping non-authoritative instances synchronized.
Declaration
public void NetworkTransformMultipleChangesOverTime(NetworkTransformTests.TransformSpace testLocalTransform, NetworkTransformTests.OverrideState overideState, NetworkTransformTests.Precision precision, NetworkTransformTests.Rotation rotationSynch, NetworkTransformTests.Axis axis)
Parameters
Validates that local space transform values remain the same when a NetworkTransform is
parented under another NetworkTransform
Declaration
public void NetworkTransformParentedLocalSpaceTest(NetworkTransformTests.Interpolation interpolation)
Parameters
This test validates the SetState(Nullable<Vector3>, Nullable<Quaternion>, Nullable<Vector3>, Boolean) method
usage for the non-authoritative side. It will either be the owner or the server making/requesting state changes.
This validates that:
- The owner authoritative mode can still be controlled by the server (i.e. owner authoritative with server authority override capabilities)
- The server authoritative mode can still be directed by the client owner.
Declaration
public void NonAuthorityOwnerSettingStateTest(NetworkTransformTests.Interpolation interpolation)
Parameters
Declaration
protected override void OnCreatePlayerPrefab()
Overrides
Declaration
protected override void OnInlineSetup()
Overrides
Declaration
protected override void OnInlineTearDown()
Overrides
Declaration
protected override void OnNewClientCreated(NetworkManager networkManager)
Parameters
Overrides
Declaration
protected override void OnOneTimeSetup()
Overrides
Declaration
protected override void OnOneTimeTearDown()
Overrides
Declaration
protected override void OnServerAndClientsCreated()
Overrides
Declaration
protected override void OnTimeTravelServerAndClientsConnected()
Overrides
The tests teleporting with and without interpolation
Declaration
public void TeleportTest(NetworkTransformTests.Interpolation interpolation, NetworkTransformTests.Precision precision)
Parameters
Tests changing all axial values one at a time.
These tests are performed:
- While in local space and world space
- While interpolation is enabled and disabled
- Using the TryCommitTransformToServer "override" that can be used
from a child derived or external class.
Declaration
public void TestAuthoritativeTransformChangeOneAtATime(NetworkTransformTests.TransformSpace testLocalTransform, NetworkTransformTests.Interpolation interpolation, NetworkTransformTests.OverrideState overideState)
Parameters
Test to make sure that the bitset value is updated properly
Declaration
public void TestBitsetValue(NetworkTransformTests.Interpolation interpolation)
Parameters
Validates that rotation checks don't produce false positive
results when rolling over between 0 and 360 degrees
Declaration
public void TestRotationThresholdDeltaCheck(NetworkTransformTests.Interpolation interpolation, NetworkTransformTests.Precision precision)
Parameters
Test to verify nonAuthority cannot change the transform directly
Declaration
public void VerifyNonAuthorityCantChangeTransform(NetworkTransformTests.Interpolation interpolation, NetworkTransformTests.Precision precision)
Parameters