docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class 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.
    Inheritance
    object
    NetcodeIntegrationTest
    NetworkVariableCollectionsTests
    Inherited Members
    NetcodeIntegrationTest.k_DefaultTimeoutPeriod
    NetcodeIntegrationTest.k_TickFrequency
    NetcodeIntegrationTest.s_GlobalTimeoutHelper
    NetcodeIntegrationTest.s_DefaultWaitForTick
    NetcodeIntegrationTest.NetcodeLogAssert
    NetcodeIntegrationTest.s_GlobalNetworkObjects
    NetcodeIntegrationTest.RegisterNetworkObject(NetworkObject)
    NetcodeIntegrationTest.DeregisterNetworkObject(NetworkObject)
    NetcodeIntegrationTest.DeregisterNetworkObject(ulong, ulong)
    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_DistributedAuthority
    NetcodeIntegrationTest.m_NetworkTopologyType
    NetcodeIntegrationTest.UseCMBService()
    NetcodeIntegrationTest.OnGetNetworkTopologyType()
    NetcodeIntegrationTest.SetDistributedAuthorityProperties(NetworkManager)
    NetcodeIntegrationTest.m_TargetFrameRate
    NetcodeIntegrationTest.m_EnableVerboseDebug
    NetcodeIntegrationTest.m_BypassConnectionTimeout
    NetcodeIntegrationTest.m_EnableTimeTravel
    NetcodeIntegrationTest.m_SetupIsACoroutine
    NetcodeIntegrationTest.m_TearDownIsACoroutine
    NetcodeIntegrationTest.VerboseDebug(string)
    NetcodeIntegrationTest.OnSetIntegrationTestMode()
    NetcodeIntegrationTest.OnOneTimeSetup()
    NetcodeIntegrationTest.OneTimeSetup()
    NetcodeIntegrationTest.OnInlineSetup()
    NetcodeIntegrationTest.SetUp()
    NetcodeIntegrationTest.OnPlayerPrefabGameObjectCreated()
    NetcodeIntegrationTest.OnServerAndClientsCreated()
    NetcodeIntegrationTest.CreateServerAndClients()
    NetcodeIntegrationTest.OnNewClientCreated(NetworkManager)
    NetcodeIntegrationTest.OnNewClientStarted(NetworkManager)
    NetcodeIntegrationTest.OnNewClientStartedAndConnected(NetworkManager)
    NetcodeIntegrationTest.ShouldWaitForNewClientToConnect(NetworkManager)
    NetcodeIntegrationTest.CreateAndStartNewClient()
    NetcodeIntegrationTest.CreateAndStartNewClientWithTimeTravel()
    NetcodeIntegrationTest.StopOneClient(NetworkManager, bool)
    NetcodeIntegrationTest.StopOneClientWithTimeTravel(NetworkManager, bool)
    NetcodeIntegrationTest.SetTimeTravelSimulatedLatency(float)
    NetcodeIntegrationTest.SetTimeTravelSimulatedDropRate(float)
    NetcodeIntegrationTest.SetTimeTravelSimulatedLatencyJitter(float)
    NetcodeIntegrationTest.CreateServerAndClients(int)
    NetcodeIntegrationTest.CanStartServerAndClients()
    NetcodeIntegrationTest.OnStartedServerAndClients()
    NetcodeIntegrationTest.OnTimeTravelStartedServerAndClients()
    NetcodeIntegrationTest.OnServerAndClientsConnected()
    NetcodeIntegrationTest.OnTimeTravelServerAndClientsConnected()
    NetcodeIntegrationTest.ClientNetworkManagerPostStartInit()
    NetcodeIntegrationTest.LogAllMessages
    NetcodeIntegrationTest.ShouldCheckForSpawnedPlayers()
    NetcodeIntegrationTest.StartServerAndClients()
    NetcodeIntegrationTest.StartServerAndClientsWithTimeTravel()
    NetcodeIntegrationTest.CanClientsLoad()
    NetcodeIntegrationTest.CanClientsUnload()
    NetcodeIntegrationTest.DeRegisterSceneManagerHandler()
    NetcodeIntegrationTest.RegisterSceneManagerHandler()
    NetcodeIntegrationTest.OnCanSceneCleanUpUnload(Scene)
    NetcodeIntegrationTest.ShutdownAndCleanUp()
    NetcodeIntegrationTest.CoroutineShutdownAndCleanUp()
    NetcodeIntegrationTest.OnTearDown()
    NetcodeIntegrationTest.OnInlineTearDown()
    NetcodeIntegrationTest.TearDown()
    NetcodeIntegrationTest.OnOneTimeTearDown()
    NetcodeIntegrationTest.OneTimeTearDown()
    NetcodeIntegrationTest.CanDestroyNetworkObject(NetworkObject)
    NetcodeIntegrationTest.DestroySceneNetworkObjects()
    NetcodeIntegrationTest.EnableMessageLogging()
    NetcodeIntegrationTest.WaitForConditionOrTimeOut(Func<bool>, TimeoutHelper)
    NetcodeIntegrationTest.WaitForConditionOrTimeOutWithTimeTravel(Func<bool>, int)
    NetcodeIntegrationTest.WaitForConditionOrTimeOut(IConditionalPredicate, TimeoutHelper)
    NetcodeIntegrationTest.WaitForConditionOrTimeOutWithTimeTravel(IConditionalPredicate, int)
    NetcodeIntegrationTest.WaitForClientsConnectedOrTimeOut(NetworkManager[])
    NetcodeIntegrationTest.WaitForClientsConnectedOrTimeOutWithTimeTravel(NetworkManager[])
    NetcodeIntegrationTest.WaitForClientsConnectedOrTimeOut()
    NetcodeIntegrationTest.WaitForClientsConnectedOrTimeOutWithTimeTravel()
    NetcodeIntegrationTest.CreateNetworkObjectPrefab(string)
    NetcodeIntegrationTest.SpawnObject(GameObject, NetworkManager, bool)
    NetcodeIntegrationTest.SpawnPlayerObject(GameObject, NetworkManager, bool)
    NetcodeIntegrationTest.SpawnObjects(GameObject, NetworkManager, int, bool)
    NetcodeIntegrationTest.AssertOnTimeout(string, TimeoutHelper)
    NetcodeIntegrationTest.WaitForTicks(NetworkManager, int)
    NetcodeIntegrationTest.TimeTravel(double, int)
    NetcodeIntegrationTest.GetTickRate()
    NetcodeIntegrationTest.GetFrameRate()
    NetcodeIntegrationTest.ConfigureFramesPerTick()
    NetcodeIntegrationTest.TimeTravelAdvanceTick()
    NetcodeIntegrationTest.TimeTravelToNextTick()
    NetcodeIntegrationTest.SimulateOneFrame()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Netcode.RuntimeTests
    Assembly: Unity.Netcode.RuntimeTests.dll
    Syntax
    [TestFixture(new object[] { NetcodeIntegrationTest.HostOrServer.Host })]
    [TestFixture(new object[] { NetcodeIntegrationTest.HostOrServer.Server })]
    public class NetworkVariableCollectionsTests : NetcodeIntegrationTest

    Constructors

    NetworkVariableCollectionsTests(HostOrServer)

    Declaration
    public NetworkVariableCollectionsTests(NetcodeIntegrationTest.HostOrServer hostOrServer)
    Parameters
    Type Name Description
    NetcodeIntegrationTest.HostOrServer hostOrServer

    Properties

    NumberOfClients

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

    Methods

    OnCreatePlayerPrefab()

    Override this to add components or adjustments to the default player prefab m_PlayerPrefab

    Declaration
    protected override void OnCreatePlayerPrefab()
    Overrides
    NetcodeIntegrationTest.OnCreatePlayerPrefab()

    OnSetVerboseDebug()

    Override this and return true if you need to troubleshoot a hard to track bug within an integration test.

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

    OnSetup()

    Called before creating and starting the server and clients Note: For AllTests and PerTest mode integration tests. For those two modes, if you want to have access to the server or client NetworkManagers then override OnServerAndClientsCreated(). m_ServerNetworkManager and m_ClientNetworkManagers

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

    TestDictionaryCollections()

    Declaration
    [UnityTest]
    public IEnumerator TestDictionaryCollections()
    Returns
    Type Description
    IEnumerator

    TestDictionaryNestedCollections()

    Declaration
    [UnityTest]
    public IEnumerator TestDictionaryNestedCollections()
    Returns
    Type Description
    IEnumerator

    TestHashSetBuiltInTypeCollections()

    Declaration
    [UnityTest]
    public IEnumerator TestHashSetBuiltInTypeCollections()
    Returns
    Type Description
    IEnumerator

    TestListBuiltInTypeCollections()

    Declaration
    [UnityTest]
    public IEnumerator TestListBuiltInTypeCollections()
    Returns
    Type Description
    IEnumerator

    TestListSerializableObjectCollections()

    Declaration
    [UnityTest]
    public IEnumerator TestListSerializableObjectCollections()
    Returns
    Type Description
    IEnumerator
    In This Article
    Back to top
    Copyright © 2024 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)