Namespace Unity.Netcode.RuntimeTests
Classes
AddNetworkPrefabTest
AddNetworkPrefabTest.EmptyComponent
BaseCollectionUpdateHelper
The base class to test rapidly adding items to a collection type
BufferDataValidationComponent
Used in conjunction with the RpcQueueTest to validate from 1 byte to (n) MaximumBufferSize
- Sending and Receiving a continually growing buffer up to (MaximumBufferSize)
- Default maximum buffer size is 1MB
ChildObjectComponent
Helper component for NetworkTransform parenting tests
ClassHavingNetworkBehaviour
ClassHavingNetworkBehaviour2
ClientApprovalDenied
ClientOnlyConnectionTests
ConnectionApprovalTimeoutTests
DeferredMessageTestNetworkVariableComponent
DeferredMessageTestRpcAndNetworkVariableComponent
DeferredMessageTestRpcComponent
DeferredMessagingTest
DictionaryCollectionUpdateHelper
Helper class to test adding Network
DictionaryTestHelper
DisconnectReasonObject
DisconnectReasonTests
DisconnectTests
Validates the client disconnection process. This assures that:
- When a client disconnects from the server that the server: -- Detects the client disconnected. -- Cleans up the transport to NGO client (and vice versa) mappings.
- When a server disconnects a client that: -- The client detects this disconnection. -- The server cleans up the transport to NGO client (and vice versa) mappings.
- When Destroy
With the server-side player object is destroyedOwner - When Dont
Destroy the server-side player object ownership is transferred back to the serverWith Owner
EmbeddedManagedNetworkSerializableType
ExampleTestComponent
HashMapKeyClass
HashMapValClass
HashSetBaseTypeTestHelper
HashableNetworkVariableTestClass
HiddenVariableObject
HiddenVariableTest
HiddenVariableTests
IntegrationTestExtended
IntegrationTestPlayers
IntegrationTestSpawning
IntegrationTestUpdated
IntermediateNetworkBehavior<T>
InvalidConnectionEventsTest
ListChangedObject
ListCollectionUpdateHelper
Helper class to test adding list entries rapidly with frequent ownership changes
ListTestHelperBase
ListTestHelperInt
ListTestHelperListInt
ListTestHelperListSerializableObject
ListTestHelperSerializableObject
ManagedNetworkSerializableType
NamedMessageTests
NestedDictionaryTestHelper
NestedNetworkManagerTests
NetVarContainer
This is a refactor of the original test's NetworkBehaviour INetVarInfo derived NetworkBehaviours
NetVarILPPClassForTests
NetVarPermTestComp
NetcodeLogAssert
NetvarDespawnShutdown
NetworkBehaviourGenericTests
This class is for testing general fixes or functionality of NetworkBehaviours
NetworkBehaviourGenericTests.SimpleNetworkBehaviour
NetworkBehaviourOnSynchronizeComponent
NetworkBehaviourPrePostSpawnTests
NetworkBehaviourPrePostSpawnTests.NetworkBehaviourPostSpawn
NetworkBehaviourPrePostSpawnTests.NetworkBehaviourPreSpawn
NetworkBehaviourReferenceIntegrationTests
Integration tests for NetworkBehaviourReference
NetworkBehaviourReferenceTests
Unit tests to test:
- Serializing NetworkObject to NetworkObjectReference
- Deserializing NetworkObjectReference to NetworkObject
- Implicit operators of NetworkObjectReference
NetworkBehaviourSynchronizeFailureComponent
A test NetworkBeahviour that simulates various types of synchronization failures and provides a synchronization success version to validate that synchronization will continue if user synchronization code fails.
NetworkBehaviourUpdaterTests
NetworkBehaviourWithNetVarArray
NetworkBehaviourWithNetworkVariables
A test NetworkBeahviour that provides a varying NetworkList size as well as additional NetworkVariables to assure if a NetworkObject fails to be created the synchronization process will continue (i.e. it will skip over that block of the reader buffer).
NetworkBehaviourWithOwnerNetworkVariables
A test NetworkBeahviour that has varying permissions in order to validate that when variable length safety checks are off NetworkVariables still are updated properly.
NetworkListChangedTestComponent
NetworkListChangedTests
NetworkListTestPredicate
Handles the more generic conditional logic for NetworkList tests
which can be used with the Wait
NetworkManagerCustomMessageManagerTests
NetworkManagerEventsTests
NetworkManagerSceneManagerTests
NetworkManagerTransportTests
NetworkManagerTransportTests.FailedTransport
Does nothing but simulate a transport that can fail at startup and/or when polling events.
NetworkObjectDestroyTests
Tests calling destroy on spawned / unspawned Network
- Server or client destroy on unspawned => Object gets destroyed, no exceptions
- Server destroy spawned => Object gets destroyed and despawned/destroyed on all clients. Server does not run NetworkPrefaInstanceHandler.HandleNetworkPrefabDestroy. Client runs it.
- Client destroy spawned => throw exception.
NetworkObjectDontDestroyWithOwnerTests
NetworkObjectNetworkClientOwnedObjectsTests
NetworkObjectOnNetworkDespawnTests
Tests that check OnNetworkDespawn being invoked
NetworkObjectOnSpawnTests
NetworkObjectOwnershipComponent
NetworkObjectOwnershipTests
NetworkObjectPropertyTests
Tests properties of NetworkObject for proper functionality.
NetworkObjectReferenceTests
Unit tests to test:
- Serializing NetworkObject to NetworkObjectReference
- Deserializing NetworkObjectReference to NetworkObject
- Implicit operators of NetworkObjectReference
NetworkObjectSpawnManyObjectsTests
NetworkObjectSpawnManyObjectsTests.SpawnObjecTrackingComponent
NetworkObjectSynchronizationTests
NetworkPrefaInstanceHandler
The Prefab instance handler to use for this test
NetworkPrefabHandlerTests
The NetworkPrefabHandler unit tests validates: Registering with GameObject, NetworkObject, or GlobalObjectIdHash Newly assigned rotation or position values for newly spawned NetworkObject instances are valid Destroying a newly spawned NetworkObject instance works Removing a INetworkPrefabInstanceHandler is removed and can be verified (very last check)
NetworkRigidbodyTest
NetworkShowHideTests
NetworkSpawnManagerTests
NetworkTimeSystemTests
Runtime tests to test the network time system with the Unity player loop.
NetworkTransformAnticipationComponent
NetworkTransformAnticipationTests
NetworkTransformBase
NetworkTransformGeneral
NetworkTransformOwnershipTests
NetworkTransformOwnershipTests.TestClientNetworkTransform
Until we can better locate the ClientNetworkTransform This will have to be used to verify the ownership authority
NetworkTransformOwnershipTests.VerifyObjectIsSpawnedOnClient
NetworkTransformOwnershipTests helper behaviour
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.
NetworkTransformStateTests
NetworkTransformTestComponent
Helper component for all NetworkTransformTests
NetworkTransformTests
Integration tests for NetworkTransform that will test both server and host operating modes and will test both authoritative models for each operating mode.
NetworkUpdateLoopTests
NetworkVarBufferCopyTest
NetworkVarBufferCopyTest.DummyNetBehaviour
NetworkVarBufferCopyTest.DummyNetVar
NetworkVariableAnticipationComponent
NetworkVariableAnticipationTests
NetworkVariableCollectionsChangingTests
NetworkVariableCollectionsTests
Client-Server only test Validates using managed collections with NetworkVariable. Managed Collections Tested:
- List
- Dictionary
- HashSet This also does some testing on nested collections, but does not test every possible combination.
NetworkVariableInheritanceTests
NetworkVariableInheritanceTests.ComponentA
NetworkVariableInheritanceTests.ComponentB
NetworkVariableInheritanceTests.ComponentC
NetworkVariableMiddleclass<TMiddleclassName>
NetworkVariableModifyOnNetworkDespawn
Validates that setting values for NetworkVariable or NetworkList during the OnNetworkDespawn method will not cause an exception to occur.
NetworkVariableNameTests
NetworkVariablePermissionTests
NetworkVariableSubclass<TSubclassName>
NetworkVariableTest
NetworkVariableTestClass
NetworkVariableTests
NetworkVariableTraitsComponent
NetworkVariableTraitsTests
NetworkVariableUserSerializableTypesTests
NetworkVisibilityComponent
NetworkVisibilityTests
NonWorkingUserNetworkVariableComponent
OwnerModifiedObject
OwnerModifiedTests
OwnerPermissionHideTests
OwnerPermissionObject
PeerDisconnectCallbackTests
Validates the client disconnection process. This assures that:
- When a client disconnects from the server that the server: -- Detects the client disconnected. -- Cleans up the transport to NGO client (and vice versa) mappings.
- When a server disconnects a client that: -- The client detects this disconnection. -- The server cleans up the transport to NGO client (and vice versa) mappings.
- When Destroy
With the server-side player object is destroyedOwner - When Dont
Destroy the server-side player object ownership is transferred back to the serverWith Owner
PlayerLoopFixedTimeTestComponent
PlayerLoopTimeTestComponent
PlayerObjectTests
RpcManyClientsObject
RpcManyClientsTests
RpcQueueTests
The RpcQueue unit tests validate:
- Maximum buffer size that can be sent (currently 1MB is the default maximum MessageQueueHistoryFrame
size)
- That all RPCs invoke at the appropriate NetworkUpdateStage
(Client and Server)
- A lower level MessageQueueContainer
test that validates MessageQueueFrameItems
after they have been put into the queue
RpcTests
RpcTests.CompileTimeHasRpcsChildClassDerivedFromNoRpcsBaseClassTest
RpcTests.CompileTimeNoRpcsBaseClassTest
RpcTests.GenericRpcTestNB<T>
RpcTests.RpcTestNB
RpcTests.RpcTestNBFloat
RpcTypeSerializationTests
RpcTypeSerializationTests.RpcTestNB
SerializableObject
ShowHideObject
SpawnTest
StartStopTests
StopStartRuntimeTests
StructHavingNetworkBehaviour
SubChildObjectComponent
Helper component for NetworkTransform parenting tests when a child is a parent of another child (i.e. "sub child")
TemplateNetworkBehaviourType<T>
TestClass
TestClass_ReferencedOnlyByTemplateNetworkBehavourType
TimeInitializationTest
Tests that the time and tick system are initialized properly
TimeIntegrationTest
Tests the times of two clients connecting to a server using the SIPTransport (returns 50ms RTT but has no latency simulation)
TransformInterpolationObject
TransformInterpolationTests
UnityObjectContext
UnityObjectContext<T>
Helper method for tests to create and destroy Unity Objects.
UnityTransportConnectionTests
UnityTransportDriverClient
UnityTransportTestHelpers
UnityTransportTestHelpers.TransportEventLogger
UnityTransportTests
UnnamedMessageTests
WorkingUserNetworkVariableComponent
WorkingUserNetworkVariableComponentBase
Used to help track instances of any child derived class
WorkingUserNetworkVariableComponentUsingExtensionMethod
Structs
HashMapKeyStruct
HashMapValStruct
HashableNetworkVariableTestStruct
ManagedTemplateNetworkSerializableType<T>
MyTypeOne
MyTypeThree
MyTypeTwo
NetVarCombinationTypes
Used to define how many NetworkVariables to use per NetVarContainer instance. There are always two