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 : NetcodeIntegrationTest
Constructors
Declaration
public NetworkTransformTests(NetcodeIntegrationTest.HostOrServer testWithHost, NetworkTransformTests.Authority authority)
Parameters
Properties
Declaration
protected override int NumberOfClients { get; }
Property Value
Overrides
Methods
This validates that multiple changes can occur within the same tick or over
several ticks while still keeping non-authoritative instances synchronized.
Declaration
public IEnumerator NetworkTransformMultipleChangesOverTime(NetworkTransformTests.TransformSpace testLocalTransform, NetworkTransformTests.OverrideState overideState)
Parameters
Returns
Validates that local space transform values remain the same when a NetworkTransform is
parented under another NetworkTransform
Declaration
public IEnumerator NetworkTransformParentedLocalSpaceTest(NetworkTransformTests.Interpolation interpolation, NetworkTransformTests.OverrideState overideState)
Parameters
Returns
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 IEnumerator NonAuthorityOwnerSettingStateTest(NetworkTransformTests.Interpolation interpolation)
Parameters
Returns
Declaration
protected override void OnCreatePlayerPrefab()
Overrides
Declaration
protected override void OnNewClientCreated(NetworkManager networkManager)
Parameters
Overrides
Declaration
protected override IEnumerator OnServerAndClientsConnected()
Returns
Overrides
Declaration
protected override void OnServerAndClientsCreated()
Overrides
Declaration
protected override IEnumerator OnSetup()
Returns
Overrides
Declaration
protected override IEnumerator OnTearDown()
Returns
Overrides
The tests teleporting with and without interpolation
Declaration
public IEnumerator TeleportTest(NetworkTransformTests.Interpolation interpolation)
Parameters
Returns
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 IEnumerator TestAuthoritativeTransformChangeOneAtATime(NetworkTransformTests.TransformSpace testLocalTransform, NetworkTransformTests.Interpolation interpolation, NetworkTransformTests.OverrideState overideState)
Parameters
Returns
Test to make sure that the bitset value is updated properly
Declaration
public IEnumerator TestBitsetValue(NetworkTransformTests.Interpolation interpolation)
Parameters
Returns
Validates that rotation checks don't produce false positive
results when rolling over between 0 and 360 degrees
Declaration
public IEnumerator TestRotationThresholdDeltaCheck(NetworkTransformTests.Interpolation interpolation)
Parameters
Returns
Test to verify nonAuthority cannot change the transform directly
Declaration
public IEnumerator VerifyNonAuthorityCantChangeTransform(NetworkTransformTests.Interpolation interpolation)
Parameters
Returns