Class NetworkBehaviourGenericTests
This class is for testing general fixes or functionality of NetworkBehaviours
Inherited Members
Namespace: Unity.Netcode.RuntimeTests
Assembly: solution.dll
Syntax
public class NetworkBehaviourGenericTests : NetcodeIntegrationTest
Properties
Name | Description |
---|---|
NumberOfClients |
Methods
Name | Description |
---|---|
CanStartServerAndClients() | Override this method and return false in order to be able to manually control when the server and clients are started. |
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) |
OnPlayerPrefabGameObjectCreated() | Invoked immediately after the player prefab GameObject is created prior to adding a NetworkObject component |
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 |
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. |
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 |
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. |