docs.unity3d.com
    Show / Hide Table of Contents

    Class NetworkBehaviourGenericTests

    This class is for testing general fixes or functionality of NetworkBehaviours

    Inheritance
    Object
    NetcodeIntegrationTest
    NetworkBehaviourGenericTests
    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.SetUp()
    NetcodeIntegrationTest.OnCreatePlayerPrefab()
    NetcodeIntegrationTest.OnServerAndClientsCreated()
    NetcodeIntegrationTest.CreateServerAndClients()
    NetcodeIntegrationTest.OnNewClientCreated(NetworkManager)
    NetcodeIntegrationTest.OnNewClientStarted(NetworkManager)
    NetcodeIntegrationTest.OnNewClientStartedAndConnected(NetworkManager)
    NetcodeIntegrationTest.CreateAndStartNewClient()
    NetcodeIntegrationTest.StopOneClient(NetworkManager, Boolean)
    NetcodeIntegrationTest.CreateServerAndClients(Int32)
    NetcodeIntegrationTest.OnStartedServerAndClients()
    NetcodeIntegrationTest.OnServerAndClientsConnected()
    NetcodeIntegrationTest.ClientNetworkManagerPostStartInit()
    NetcodeIntegrationTest.LogAllMessages
    NetcodeIntegrationTest.StartServerAndClients()
    NetcodeIntegrationTest.CanClientsLoad()
    NetcodeIntegrationTest.CanClientsUnload()
    NetcodeIntegrationTest.DeRegisterSceneManagerHandler()
    NetcodeIntegrationTest.RegisterSceneManagerHandler()
    NetcodeIntegrationTest.OnCanSceneCleanUpUnload(Scene)
    NetcodeIntegrationTest.ShutdownAndCleanUp()
    NetcodeIntegrationTest.OnTearDown()
    NetcodeIntegrationTest.TearDown()
    NetcodeIntegrationTest.OnOneTimeTearDown()
    NetcodeIntegrationTest.OneTimeTearDown()
    NetcodeIntegrationTest.CanDestroyNetworkObject(NetworkObject)
    NetcodeIntegrationTest.DestroySceneNetworkObjects()
    NetcodeIntegrationTest.EnableMessageLogging()
    NetcodeIntegrationTest.WaitForConditionOrTimeOut(Func<Boolean>, TimeoutHelper)
    NetcodeIntegrationTest.WaitForConditionOrTimeOut(IConditionalPredicate, TimeoutHelper)
    NetcodeIntegrationTest.WaitForClientsConnectedOrTimeOut(NetworkManager[])
    NetcodeIntegrationTest.WaitForClientsConnectedOrTimeOut()
    NetcodeIntegrationTest.CreateNetworkObjectPrefab(String)
    NetcodeIntegrationTest.SpawnObject(GameObject, NetworkManager, Boolean)
    NetcodeIntegrationTest.SpawnObjects(GameObject, NetworkManager, Int32, Boolean)
    NetcodeIntegrationTest.AssertOnTimeout(String, TimeoutHelper)
    NetcodeIntegrationTest.WaitForTicks(NetworkManager, Int32)
    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 NetworkBehaviourGenericTests : NetcodeIntegrationTest

    Properties

    NumberOfClients

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

    Methods

    CanStartServerAndClients()

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

    OnNetworkDespawnInvokedWhenClientDisconnects()

    This validates that upon a client disconnecting, the server-side client's player clone will invoke NetworkBehaviour.OnNetworkDespawn when the component precedes the NetworkObject component.(PR-2323)

    Declaration
    public IEnumerator OnNetworkDespawnInvokedWhenClientDisconnects()
    Returns
    Type Description
    IEnumerator

    OnPlayerPrefabGameObjectCreated()

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

    OnSetup()

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

    ValidatedDisableddNetworkBehaviourWarning()

    This validates the fix for when a child GameObject with a NetworkBehaviour is deleted while the parent GameObject with a NetworkObject is spawned and is not deleted until a later time would cause an exception due to the NetworkBehaviour not being removed from the NetworkObject.ChildNetworkBehaviours list.

    Declaration
    public IEnumerator ValidatedDisableddNetworkBehaviourWarning()
    Returns
    Type Description
    IEnumerator

    ValidateDeleteChildNetworkBehaviour()

    This validates the fix for when a child GameObject with a NetworkBehaviour is deleted while the parent GameObject with a NetworkObject is spawned and is not deleted until a later time would cause an exception due to the NetworkBehaviour not being removed from the NetworkObject.ChildNetworkBehaviours list.

    Declaration
    public IEnumerator ValidateDeleteChildNetworkBehaviour()
    Returns
    Type Description
    IEnumerator

    ValidateNoSpam()

    This test validates a fix to NetworkBehaviour.NetworkObject when the NetworkManager.LogLevel is set to Developer Note: This test does not require any clients, but should not impact this particular test if new tests are added to this class that do require clients

    Declaration
    public IEnumerator ValidateNoSpam()
    Returns
    Type Description
    IEnumerator
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on 26 October 2023