docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Namespace Unity.Netcode.RuntimeTests

    Classes

    AddNetworkPrefabTest

    AddNetworkPrefabTest.EmptyComponent

    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

    ConnectionApprovalTests

    ConnectionApprovalTimeoutTests

    DeferredMessageTestNetworkVariableComponent

    DeferredMessageTestRpcAndNetworkVariableComponent

    DeferredMessageTestRpcComponent

    DeferredMessagingTest

    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 DestroyWithOwner the server-side player object is destroyed
    • When DontDestroyWithOwner the server-side player object ownership is transferred back to the server

    EmbeddedManagedNetworkSerializableType

    ExampleTestComponent

    HashMapKeyClass

    HashMapValClass

    HashSetBaseTypeTestHelper

    HashableNetworkVariableTestClass

    HiddenVariableObject

    HiddenVariableTest

    HiddenVariableTests

    IntegrationTestExtended

    IntegrationTestPlayers

    IntegrationTestSpawning

    IntegrationTestUpdated

    IntermediateNetworkBehavior<T>

    InvalidConnectionEventsTest

    ListChangedObject

    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 WaitForConditionOrTimeOut(Func<bool>, TimeoutHelper) that accepts anything derived from the ConditionalPredicateBase class as a parameter.

    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 NetworkObjects. Expected behavior:

    • 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

    NetworkVariableCollectionsTests

    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 DestroyWithOwner the server-side player object is destroyed
    • When DontDestroyWithOwner the server-side player object ownership is transferred back to the server

    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

    NetworkBehaviourOnSynchronizeComponent.SomeCustomSerializationData

    NetworkVariableTestStruct

    StructUsedOnlyInNetworkList

    TemplatedValueOnlyReferencedByNetworkVariableSubclass<T>

    TestStruct

    UnityTransportTestHelpers.TransportEvent

    UnmanagedNetworkSerializableType

    UnmanagedTemplateNetworkSerializableType<T>

    Interfaces

    IDictionaryTestHelperBase<TKey, TValue>

    IHashSetTestHelperBase<T>

    IListTestHelperBase<T>

    Enums

    ByteEnum

    ConnectionApprovalTimeoutTests.ApprovalTimedOutTypes

    DisconnectTests.ClientDisconnectType

    DisconnectTests.OwnerPersistence

    IntEnum

    ListTestHelperBase.DeltaTypes

    ListTestHelperBase.Targets

    LongEnum

    NetVarContainer.NetVarsToCheck

    NetworkBehaviourSynchronizeFailureComponent.FailureTypes

    NetworkListTestPredicate.NetworkListTestStates

    NetworkObjectDestroyTests.ClientDestroyObject

    NetworkObjectOnNetworkDespawnTests.InstanceType

    NetworkObjectOnSpawnTests.ObserverTestTypes

    NetworkObjectOwnershipTests.OwnershipChecks

    NetworkObjectReferenceTests.NetworkObjectConstructorTypes

    NetworkObjectSynchronizationTests.VariableLengthSafety

    NetworkTransformBase.Authority

    NetworkTransformBase.Axis

    NetworkTransformBase.ChildrenTransformCheckType

    NetworkTransformBase.Interpolation

    NetworkTransformBase.OverrideState

    NetworkTransformBase.Precision

    NetworkTransformBase.Rotation

    NetworkTransformBase.RotationCompression

    NetworkTransformBase.TransformSpace

    NetworkTransformOwnershipTests.StartingOwnership

    NetworkTransformStateTests.Precision

    NetworkTransformStateTests.Rotation

    NetworkTransformStateTests.SyncAxis

    NetworkTransformStateTests.SynchronizationType

    NetworkTransformStateTests.TransformSpace

    NetworkVariableCollectionsTests.CollectionTypes

    NetworkVariableTest.SomeEnum

    NetworkVariableTests.ListRemoveTypes

    NetworkVisibilityTests.SceneManagementState

    PeerDisconnectCallbackTests.ClientDisconnectType

    SByteEnum

    ShortEnum

    UIntEnum

    ULongEnum

    UShortEnum

    Delegates

    NetworkTransformTestComponent.AuthorityPushedTransformStateDelegateHandler

    NetworkTransformTestComponent.NonAuthorityReceivedTransformStateDelegateHandler

    NetworkVariableTests.GetRandomElement<T>

    RpcTypeSerializationTests.RpcTestNB.OnReceivedDelegate

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)