docs.unity3d.com
    Show / Hide Table of Contents

    Class NetworkVariableTests

    Inheritance
    Object
    NetcodeIntegrationTest
    NetworkVariableTests
    Inherited Members
    NetcodeIntegrationTest.s_GlobalTimeoutHelper
    NetcodeIntegrationTest.s_DefaultWaitForTick
    NetcodeIntegrationTest.NetcodeLogAssert
    NetcodeIntegrationTest.s_GlobalNetworkObjects
    NetcodeIntegrationTest.RegisterNetworkObject(NetworkObject)
    NetcodeIntegrationTest.DeregisterNetworkObject(NetworkObject)
    NetcodeIntegrationTest.DeregisterNetworkObject(UInt64, UInt64)
    NetcodeIntegrationTest.TotalClients
    NetcodeIntegrationTest.k_DefaultTickRate
    NetcodeIntegrationTest.m_CreateServerFirst
    NetcodeIntegrationTest.m_PlayerPrefab
    NetcodeIntegrationTest.m_ServerNetworkManager
    NetcodeIntegrationTest.m_ClientNetworkManagers
    NetcodeIntegrationTest.m_PlayerNetworkObjects
    NetcodeIntegrationTest.m_UseHost
    NetcodeIntegrationTest.m_TargetFrameRate
    NetcodeIntegrationTest.m_EnableVerboseDebug
    NetcodeIntegrationTest.m_BypassConnectionTimeout
    NetcodeIntegrationTest.VerboseDebug(String)
    NetcodeIntegrationTest.OnSetVerboseDebug()
    NetcodeIntegrationTest.OnSetIntegrationTestMode()
    NetcodeIntegrationTest.OnOneTimeSetup()
    NetcodeIntegrationTest.OneTimeSetup()
    NetcodeIntegrationTest.OnInlineSetup()
    NetcodeIntegrationTest.SetUp()
    NetcodeIntegrationTest.OnCreatePlayerPrefab()
    NetcodeIntegrationTest.OnPlayerPrefabGameObjectCreated()
    NetcodeIntegrationTest.OnServerAndClientsCreated()
    NetcodeIntegrationTest.CreateServerAndClients()
    NetcodeIntegrationTest.OnNewClientCreated(NetworkManager)
    NetcodeIntegrationTest.OnNewClientStarted(NetworkManager)
    NetcodeIntegrationTest.OnNewClientStartedAndConnected(NetworkManager)
    NetcodeIntegrationTest.CreateAndStartNewClient()
    NetcodeIntegrationTest.CreateAndStartNewClientWithTimeTravel()
    NetcodeIntegrationTest.StopOneClient(NetworkManager, Boolean)
    NetcodeIntegrationTest.StopOneClientWithTimeTravel(NetworkManager, Boolean)
    NetcodeIntegrationTest.CreateServerAndClients(Int32)
    NetcodeIntegrationTest.OnStartedServerAndClients()
    NetcodeIntegrationTest.OnTimeTravelStartedServerAndClients()
    NetcodeIntegrationTest.OnServerAndClientsConnected()
    NetcodeIntegrationTest.OnTimeTravelServerAndClientsConnected()
    NetcodeIntegrationTest.ClientNetworkManagerPostStartInit()
    NetcodeIntegrationTest.LogAllMessages
    NetcodeIntegrationTest.StartServerAndClients()
    NetcodeIntegrationTest.StartServerAndClientsWithTimeTravel()
    NetcodeIntegrationTest.CanClientsLoad()
    NetcodeIntegrationTest.CanClientsUnload()
    NetcodeIntegrationTest.DeRegisterSceneManagerHandler()
    NetcodeIntegrationTest.RegisterSceneManagerHandler()
    NetcodeIntegrationTest.OnCanSceneCleanUpUnload(Scene)
    NetcodeIntegrationTest.ShutdownAndCleanUp()
    NetcodeIntegrationTest.OnInlineTearDown()
    NetcodeIntegrationTest.TearDown()
    NetcodeIntegrationTest.OnOneTimeTearDown()
    NetcodeIntegrationTest.OneTimeTearDown()
    NetcodeIntegrationTest.CanDestroyNetworkObject(NetworkObject)
    NetcodeIntegrationTest.DestroySceneNetworkObjects()
    NetcodeIntegrationTest.EnableMessageLogging()
    NetcodeIntegrationTest.WaitForConditionOrTimeOut(Func<Boolean>, TimeoutHelper)
    NetcodeIntegrationTest.WaitForConditionOrTimeOutWithTimeTravel(Func<Boolean>, Int32)
    NetcodeIntegrationTest.WaitForConditionOrTimeOut(IConditionalPredicate, TimeoutHelper)
    NetcodeIntegrationTest.WaitForConditionOrTimeOutWithTimeTravel(IConditionalPredicate, Int32)
    NetcodeIntegrationTest.WaitForClientsConnectedOrTimeOut(NetworkManager[])
    NetcodeIntegrationTest.WaitForClientsConnectedOrTimeOutWithTimeTravel(NetworkManager[])
    NetcodeIntegrationTest.WaitForClientsConnectedOrTimeOut()
    NetcodeIntegrationTest.WaitForClientsConnectedOrTimeOutWithTimeTravel()
    NetcodeIntegrationTest.CreateNetworkObjectPrefab(String)
    NetcodeIntegrationTest.SpawnObject(GameObject, NetworkManager, Boolean)
    NetcodeIntegrationTest.SpawnObjects(GameObject, NetworkManager, Int32, Boolean)
    NetcodeIntegrationTest.AssertOnTimeout(String, TimeoutHelper)
    NetcodeIntegrationTest.WaitForTicks(NetworkManager, Int32)
    NetcodeIntegrationTest.TimeTravel(Double, Int32)
    NetcodeIntegrationTest.TimeTravelToNextTick()
    NetcodeIntegrationTest.SimulateOneFrame()
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Netcode.RuntimeTests
    Syntax
    public class NetworkVariableTests : NetcodeIntegrationTest

    Constructors

    NetworkVariableTests(Boolean)

    Declaration
    public NetworkVariableTests(bool ensureLengthSafety)
    Parameters
    Type Name Description
    Boolean ensureLengthSafety

    Properties

    m_EnableTimeTravel

    Declaration
    protected override bool m_EnableTimeTravel { get; }
    Property Value
    Type Description
    Boolean
    Overrides
    NetcodeIntegrationTest.m_EnableTimeTravel

    m_SetupIsACoroutine

    Declaration
    protected override bool m_SetupIsACoroutine { get; }
    Property Value
    Type Description
    Boolean
    Overrides
    NetcodeIntegrationTest.m_SetupIsACoroutine

    m_TearDownIsACoroutine

    Declaration
    protected override bool m_TearDownIsACoroutine { get; }
    Property Value
    Type Description
    Boolean
    Overrides
    NetcodeIntegrationTest.m_TearDownIsACoroutine

    NumberOfClients

    Declaration
    protected override int NumberOfClients { get; }
    Property Value
    Type Description
    Int32
    Overrides
    NetcodeIntegrationTest.NumberOfClients

    Methods

    AllNetworkVariableTypes(Boolean)

    Runs generalized tests on all predefined NetworkVariable types

    Declaration
    public void AllNetworkVariableTypes(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost

    CanStartServerAndClients()

    Declaration
    protected override bool CanStartServerAndClients()
    Returns
    Type Description
    Boolean
    Overrides
    NetcodeIntegrationTest.CanStartServerAndClients()

    ClientNetworkVariableTestSpawned(NetworkVariableTest)

    Declaration
    public static void ClientNetworkVariableTestSpawned(NetworkVariableTest networkVariableTest)
    Parameters
    Type Name Description
    NetworkVariableTest networkVariableTest

    ClientWritePermissionTest(Boolean)

    Declaration
    public void ClientWritePermissionTest(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost

    FixedString32Test(Boolean)

    Declaration
    public void FixedString32Test(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost

    NetworkListAdd(Boolean)

    Declaration
    public void NetworkListAdd(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost

    NetworkListArrayOperator(Boolean)

    Declaration
    public void NetworkListArrayOperator(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost

    NetworkListClear(Boolean)

    Declaration
    public void NetworkListClear(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost

    NetworkListContains(Boolean)

    Declaration
    public void NetworkListContains(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost

    NetworkListIEnumerator(Boolean)

    Declaration
    public void NetworkListIEnumerator(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost

    NetworkListIndexOf(Boolean)

    Declaration
    public void NetworkListIndexOf(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost

    NetworkListInsert(Boolean)

    Declaration
    public void NetworkListInsert(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost

    NetworkListRemove(Boolean)

    Declaration
    public void NetworkListRemove(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost

    NetworkListRemoveAt(Boolean)

    Declaration
    public void NetworkListRemoveAt(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost

    NetworkListValueUpdate(Boolean)

    Declaration
    public void NetworkListValueUpdate(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost

    NetworkVariableSync_WithDifferentTimeScale(Boolean, Single)

    Runs tests that network variables sync on client whatever the local value of timeScale.

    Declaration
    public void NetworkVariableSync_WithDifferentTimeScale(bool useHost, float timeScale)
    Parameters
    Type Name Description
    Boolean useHost
    Single timeScale

    OnSetup()

    Declaration
    protected override IEnumerator OnSetup()
    Returns
    Type Description
    IEnumerator
    Overrides
    NetcodeIntegrationTest.OnSetup()

    OnTearDown()

    Declaration
    protected override IEnumerator OnTearDown()
    Returns
    Type Description
    IEnumerator
    Overrides
    NetcodeIntegrationTest.OnTearDown()

    TestINetworkSerializableClassCallsNetworkSerialize(Boolean)

    Declaration
    public void TestINetworkSerializableClassCallsNetworkSerialize(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost

    TestINetworkSerializableStructCallsNetworkSerialize(Boolean)

    Declaration
    public void TestINetworkSerializableStructCallsNetworkSerialize(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost

    TestManagedINetworkSerializableNetworkVariablesDeserializeInPlace()

    Declaration
    public void TestManagedINetworkSerializableNetworkVariablesDeserializeInPlace()

    TestNetworkListStruct(Boolean)

    Declaration
    public void TestNetworkListStruct(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost

    TestNetworkVariableClass(Boolean)

    Declaration
    public void TestNetworkVariableClass(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost

    TestNetworkVariableEnum(Boolean)

    Declaration
    public void TestNetworkVariableEnum(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost

    TestNetworkVariableStruct(Boolean)

    Declaration
    public void TestNetworkVariableStruct(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost

    TestNetworkVariableTemplateBehaviourClass(Boolean)

    Declaration
    public void TestNetworkVariableTemplateBehaviourClass(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost

    TestNetworkVariableTemplateBehaviourClassNotReferencedElsewhere(Boolean)

    Declaration
    public void TestNetworkVariableTemplateBehaviourClassNotReferencedElsewhere(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost

    TestNetworkVariableTemplateBehaviourStruct(Boolean)

    Declaration
    public void TestNetworkVariableTemplateBehaviourStruct(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost

    TestNetworkVariableTemplateClass(Boolean)

    Declaration
    public void TestNetworkVariableTemplateClass(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost

    TestNetworkVariableTemplateStruct(Boolean)

    Declaration
    public void TestNetworkVariableTemplateStruct(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost

    TestTypesReferencedInSubclassSerializeSuccessfully()

    Declaration
    public void TestTypesReferencedInSubclassSerializeSuccessfully()

    TestUnmnagedINetworkSerializableNetworkVariablesDeserializeInPlace()

    Declaration
    public void TestUnmnagedINetworkSerializableNetworkVariablesDeserializeInPlace()

    TestUnsupportedManagedTypesThrowExceptions()

    Declaration
    public void TestUnsupportedManagedTypesThrowExceptions()

    TestUnsupportedManagedTypesWithUserSerializationDoNotThrowExceptions()

    Declaration
    public void TestUnsupportedManagedTypesWithUserSerializationDoNotThrowExceptions()

    TestUnsupportedUnmanagedTypesThrowExceptions()

    Declaration
    public void TestUnsupportedUnmanagedTypesThrowExceptions()

    TestUnsupportedUnmanagedTypesWithUserSerializationDoNotThrowExceptions()

    Declaration
    public void TestUnsupportedUnmanagedTypesWithUserSerializationDoNotThrowExceptions()

    WhenListContainsManyLargeValues_OverflowExceptionIsNotThrown(Boolean)

    Declaration
    public void WhenListContainsManyLargeValues_OverflowExceptionIsNotThrown(bool useHost)
    Parameters
    Type Name Description
    Boolean useHost
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on 26 October 2023